-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'vikas0212git-patch-1' of https://github.com/microsoft/v…
…scode-azure-iot-edge into vikas0212git-patch-1
- Loading branch information
Showing
17 changed files
with
751 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.194.0/containers/dotnet/.devcontainer/base.Dockerfile | ||
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-3.1 | ||
|
||
# Install Docker CE | ||
COPY library-scripts/*.sh /tmp/library-scripts/ | ||
RUN \ | ||
apt-get update -y \ | ||
# Use Docker script from script library to set things up - enable non-root docker, user vscode, using moby | ||
&& /bin/bash /tmp/library-scripts/docker-in-docker-debian.sh "true" "vscode" "true" \ | ||
# install iotedgehubdev | ||
&& apt-get install -y python3-pip && pip3 install iotedgehubdev \ | ||
# Clean up | ||
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts/ | ||
|
||
# launch docker-ce | ||
ENTRYPOINT [ "/usr/local/share/docker-init.sh" ] | ||
CMD [ "sleep", "infinity" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.194.0/containers/dotnet | ||
{ | ||
"name": "Azure IoTEdge C# (.NET)", | ||
"build": { "dockerfile": "Dockerfile" }, | ||
"runArgs": ["--init", "--privileged"], | ||
"mounts": [ | ||
// Keep command history | ||
"source=ostf-bashhistory,target=/commandhistory,type=volume", | ||
// Use docker-in-docker socket | ||
"source=dind-var-lib-docker,target=/var/lib/docker,type=volume" | ||
], | ||
"overrideCommand": false, | ||
|
||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"terminal.integrated.profiles.linux": { | ||
"bash": { | ||
"path": "/bin/bash" | ||
} | ||
} | ||
}, | ||
|
||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"ms-dotnettools.csharp", | ||
"ms-azuretools.vscode-docker", | ||
"vsciot-vscode.azure-iot-tools" | ||
], | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [5000, 5001], | ||
|
||
// [Optional] To reuse of your local HTTPS dev cert: | ||
// | ||
// 1. Export it locally using this command: | ||
// * Windows PowerShell: | ||
// dotnet dev-certs https --trust; dotnet dev-certs https -ep "$env:USERPROFILE/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere" | ||
// * macOS/Linux terminal: | ||
// dotnet dev-certs https --trust; dotnet dev-certs https -ep "${HOME}/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere" | ||
// | ||
// 2. Uncomment these 'remoteEnv' lines: | ||
// "remoteEnv": { | ||
// "ASPNETCORE_Kestrel__Certificates__Default__Password": "SecurePwdGoesHere", | ||
// "ASPNETCORE_Kestrel__Certificates__Default__Path": "/home/vscode/.aspnet/https/aspnetapp.pfx", | ||
// }, | ||
// | ||
// 3. Do one of the following depending on your scenario: | ||
// * When using GitHub Codespaces and/or Remote - Containers: | ||
// 1. Start the container | ||
// 2. Drag ~/.aspnet/https/aspnetapp.pfx into the root of the file explorer | ||
// 3. Open a terminal in VS Code and run "mkdir -p /home/vscode/.aspnet/https && mv aspnetapp.pfx /home/vscode/.aspnet/https" | ||
// | ||
// * If only using Remote - Containers with a local container, uncomment this line instead: | ||
// "mounts": [ "source=${env:HOME}${env:USERPROFILE}/.aspnet/https,target=/home/vscode/.aspnet/https,type=bind" ], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "dotnet restore", | ||
|
||
"remoteUser": "vscode" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.194.0/containers/debian/.devcontainer/base.Dockerfile | ||
|
||
# [Choice] Debian version: bullseye, buster, stretch | ||
ARG VARIANT="buster" | ||
FROM mcr.microsoft.com/vscode/devcontainers/cpp:0-${VARIANT} | ||
|
||
# Install Docker CE | ||
COPY library-scripts/*.sh /tmp/library-scripts/ | ||
RUN \ | ||
apt-get update -y \ | ||
# Use Docker script from script library to set things up - enable non-root docker, user vscode, using moby | ||
&& /bin/bash /tmp/library-scripts/docker-in-docker-debian.sh "true" "automatic" "true" \ | ||
# install iotedgehubdev | ||
&& apt-get install -y python3-pip && pip3 install --upgrade pip && pip install iotedgehubdev \ | ||
# Clean up | ||
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts/ | ||
|
||
# launch docker-ce | ||
ENTRYPOINT [ "/usr/local/share/docker-init.sh" ] | ||
CMD [ "sleep", "infinity" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.194.0/containers/debian | ||
{ | ||
"name": "Azure IoT Edge C/C++", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
// Update 'VARIANT' to pick an Debian version: bullseye, buster, stretch | ||
"args": { "VARIANT": "buster" } | ||
}, | ||
"runArgs": ["--init", "--privileged"], | ||
"mounts": [ | ||
// Keep command history | ||
"source=ostf-bashhistory,target=/commandhistory,type=volume", | ||
// Use docker-in-docker socket | ||
"source=dind-var-lib-docker,target=/var/lib/docker,type=volume" | ||
], | ||
"overrideCommand": false, | ||
|
||
// Set *default* container specific settings.json values on container create. | ||
"settings": { "terminal.integrated.defaultProfile.linux": "/bin/bash" }, | ||
|
||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"ms-vscode.cpptools", | ||
"ms-azuretools.vscode-docker", | ||
"vsciot-vscode.azure-iot-tools" | ||
], | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker. | ||
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ], | ||
|
||
// Uncomment when using a ptrace-based debugger like C++, Go, and Rust | ||
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ], | ||
|
||
"remoteUser": "vscode" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.194.0/containers/java/.devcontainer/base.Dockerfile | ||
|
||
# [Choice] Java version: 11, 16 | ||
ARG VARIANT="16" | ||
FROM mcr.microsoft.com/vscode/devcontainers/java:0-${VARIANT} | ||
|
||
# [Option] Install Maven | ||
ARG INSTALL_MAVEN="false" | ||
ARG MAVEN_VERSION="" | ||
RUN if [ "${INSTALL_MAVEN}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install maven \"${MAVEN_VERSION}\""; fi | ||
|
||
# Install Docker CE | ||
COPY library-scripts/*.sh /tmp/library-scripts/ | ||
RUN \ | ||
apt-get update -y \ | ||
# Use Docker script from script library to set things up - enable non-root docker, user vscode, using moby | ||
&& /bin/bash /tmp/library-scripts/docker-in-docker-debian.sh "true" "automatic" "true" \ | ||
# install iotedgehubdev | ||
&& apt-get install -y python3-pip && pip3 install --upgrade pip && pip install iotedgehubdev \ | ||
# Clean up | ||
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts/ | ||
|
||
# launch docker-ce | ||
ENTRYPOINT [ "/usr/local/share/docker-init.sh" ] | ||
CMD [ "sleep", "infinity" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.194.0/containers/java | ||
{ | ||
"name": "Azure IoTEdge Java", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"args": { | ||
// Update the VARIANT arg to pick a Java version: 11, 16 | ||
"VARIANT": "11", | ||
// Options | ||
"INSTALL_MAVEN": "true", | ||
"INSTALL_GRADLE": "false", | ||
"NODE_VERSION": "none" | ||
} | ||
}, | ||
"runArgs": ["--init", "--privileged"], | ||
"mounts": [ | ||
// Keep command history | ||
"source=ostf-bashhistory,target=/commandhistory,type=volume", | ||
// Use docker-in-docker socket | ||
"source=dind-var-lib-docker,target=/var/lib/docker,type=volume" | ||
], | ||
"overrideCommand": false, | ||
|
||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"java.home": "/docker-java-home", | ||
"terminal.integrated.profiles.linux": { | ||
"bash": { | ||
"path": "/bin/bash" | ||
} | ||
} | ||
}, | ||
|
||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"vscjava.vscode-java-pack", | ||
"ms-azuretools.vscode-docker", | ||
"vsciot-vscode.azure-iot-tools" | ||
], | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "java -version", | ||
|
||
"remoteUser": "vscode" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.194.0/containers/javascript-node/.devcontainer/base.Dockerfile | ||
|
||
# [Choice] Node.js version: 16, 14, 12 | ||
ARG VARIANT="16-buster" | ||
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT} | ||
|
||
# Install Docker CE | ||
COPY library-scripts/*.sh /tmp/library-scripts/ | ||
RUN \ | ||
apt-get update -y \ | ||
# Use Docker script from script library to set things up - enable non-root docker, user vscode, using moby | ||
&& /bin/bash /tmp/library-scripts/docker-in-docker-debian.sh "true" "automatic" "true" \ | ||
# install iotedgehubdev | ||
&& apt-get install -y python3-pip && pip3 install --upgrade pip && pip install iotedgehubdev \ | ||
# Clean up | ||
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts/ | ||
|
||
# [Optional] Uncomment this line to install global node packages. | ||
# ARG EXTRA_NODE_VERSION=10 | ||
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}" | ||
|
||
RUN npm install -g yo@latest generator-azure-iot-edge-module | ||
|
||
# launch docker-ce | ||
ENTRYPOINT [ "/usr/local/share/docker-init.sh" ] | ||
CMD [ "sleep", "infinity" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.194.0/containers/javascript-node | ||
{ | ||
"name": "Azure IoTEdge Node.js", | ||
"build": { "dockerfile": "Dockerfile" }, | ||
"runArgs": ["--init", "--privileged"], | ||
"mounts": [ | ||
// Keep command history | ||
"source=ostf-bashhistory,target=/commandhistory,type=volume", | ||
// Use docker-in-docker socket | ||
"source=dind-var-lib-docker,target=/var/lib/docker,type=volume" | ||
], | ||
"overrideCommand": false, | ||
|
||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"terminal.integrated.profiles.linux": { | ||
"bash": { | ||
"path": "/bin/bash" | ||
} | ||
} | ||
}, | ||
|
||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"dbaeumer.vscode-eslint", | ||
"ms-azuretools.vscode-docker", | ||
"vsciot-vscode.azure-iot-tools" | ||
], | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "yarn install" | ||
|
||
"remoteUser": "node" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.194.0/containers/python-3/.devcontainer/base.Dockerfile | ||
|
||
# [Choice] Python version: 3, 3.9, 3.8, 3.7, 3.6 | ||
ARG VARIANT="3.7" | ||
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} | ||
|
||
# Install Docker CE | ||
COPY library-scripts/*.sh /tmp/library-scripts/ | ||
RUN \ | ||
apt-get update -y \ | ||
# Use Docker script from script library to set things up - enable non-root docker, user vscode, using moby | ||
&& /bin/bash /tmp/library-scripts/docker-in-docker-debian.sh "true" "automatic" "true" \ | ||
# install iotedgehubdev | ||
# && apt-get install -y python3-pip && pip3 install --upgrade pip && pip install iotedgehubdev \ | ||
&& apt-get install -y python3-pip && pip install iotedgehubdev \ | ||
# Clean up | ||
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts/ | ||
|
||
# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image. | ||
# COPY requirements.txt /tmp/pip-tmp/ | ||
# RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \ | ||
# && rm -rf /tmp/pip-tmp | ||
|
||
# launch docker-ce | ||
ENTRYPOINT [ "/usr/local/share/docker-init.sh" ] | ||
CMD [ "sleep", "infinity" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.194.0/containers/python-3 | ||
{ | ||
"name": "Azure IoT Edge Python 3.7", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"args": { | ||
// Update 'VARIANT' to pick a Python version: 3, 3.6, 3.7, 3.8, 3.9 | ||
"VARIANT": "3.7" | ||
} | ||
}, | ||
"runArgs": ["--init", "--privileged"], | ||
"mounts": [ | ||
// Keep command history | ||
"source=ostf-bashhistory,target=/commandhistory,type=volume", | ||
// Use docker-in-docker socket | ||
"source=dind-var-lib-docker,target=/var/lib/docker,type=volume" | ||
], | ||
"overrideCommand": false, | ||
|
||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"terminal.integrated.profiles.linux": { | ||
"bash": { | ||
"path": "/bin/bash" | ||
} | ||
}, | ||
"terminal.integrated.defaultProfile.linux": "bash", | ||
"python.pythonPath": "/usr/local/bin/python", | ||
"python.languageServer": "Pylance", | ||
"python.linting.enabled": true, | ||
"python.linting.pylintEnabled": true, | ||
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", | ||
"python.formatting.blackPath": "/usr/local/py-utils/bin/black", | ||
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf", | ||
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit", | ||
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", | ||
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", | ||
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle", | ||
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", | ||
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint" | ||
}, | ||
|
||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"ms-azuretools.vscode-docker", | ||
"vsciot-vscode.azure-iot-tools" | ||
], | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "pip3 install --user -r requirements.txt", | ||
|
||
"remoteUser": "vscode" | ||
} |
Oops, something went wrong.