This repository has been archived by the owner on Nov 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from Microsoft/clantz/restructure
Restructured vscode-dev-containers repository
- Loading branch information
Showing
248 changed files
with
2,188 additions
and
1,699 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
**/bin | ||
**/obj | ||
*.DS_Store | ||
*.pyc | ||
Thumbs.db | ||
**/.build | ||
**/node_modules | ||
*.out | ||
*.log | ||
**/.vscode/ipch |
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 |
---|---|---|
@@ -1,11 +1,35 @@ | ||
# Development Containers | ||
# Visual Studio Code Remote Development Container Definitions | ||
|
||
See [headless-containers](https://github.com/Microsoft/vscode-docs-pr/blob/master/docs/headless/headless-containers.md). | ||
A **development container** is a running Docker container that comes with a basic tool stack (Python, node, Go, etc.) and its prerequisites (e.g. `pylint` for Python). This container may be used to actually run an application or be focused exclusively on sandboxing tools, libraries, runtimes, or other utilities that need to be run against a codebase. | ||
|
||
# Extension Authors | ||
Visual Studio Code Remote allows you to open any folder inside (or mounted into) a dev container and take advantage of VS Code's full feature set. When using the capability, VS Code selectively runs certain extensions in the container to optimize your experience. The result is that VS Code can provide a local-quality development experience including full IntelliSense, debugging, and more regardless of where your code is located. | ||
|
||
See [headless-extensions](https://github.com/Microsoft/vscode-docs-pr/blob/master/docs/headless/headless-extensions.md). | ||
**[See here to learn more about VS Code Remote](https://aka.ms/vscode-remote)**. | ||
|
||
# Reporting Issues | ||
This repository contains a set of **dev container definitions** made up of files like `devContainer.json` that can be added to existing projects to get you up and running in a containerized environment. | ||
|
||
## Trying a definition | ||
|
||
1. Open a `containers` sub-folder | ||
2. Check out the README to see if there are any manual steps | ||
3. Clone this repository or copy the contents of the folder to your machine | ||
4. Run the **Remote: Open Folder in Container...** command in VS Code | ||
5. Select the definition folder in the "open" dialog | ||
|
||
Many definitions include a `test-project` that you can use to see the dev container in action. | ||
|
||
## Using a definition | ||
|
||
You can either: | ||
|
||
- Run **Remote: Create Container Configuration File...** command in VS Code and pick the definition. | ||
|
||
- Manually copy the contents of one of the `containers` sub-folders into your project. When manually copying, note that some definitions contain a `test-project` folder and/or a `.vscode/launch.json`, `.vscode/settings.json` or `.vscode/tasks.json` file that can be omitted. | ||
|
||
## Contents | ||
|
||
- `containers` - Dev container definition folders. | ||
- `container-templates` - Templates for creating your own container definitions in your project or for contributing back to this repository. | ||
|
||
## Contributing | ||
|
||
When reporting issues please file them against the https://github.com/Microsoft/vscode-remote/issues repository. |
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,9 @@ | ||
{ | ||
"name": "Dev Container Definition Template - Docker Compose", | ||
"dockerComposeFile": "docker-compose.dev-container.yml", | ||
"service": "your-service-name-here", | ||
"volume": "app", | ||
"extensions": [ | ||
"mutantdino.resourcemonitor" | ||
] | ||
} |
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,6 @@ | ||
README.md | ||
test-project | ||
.vscode/launch.json | ||
.vscode/launch.test.json | ||
.vscode/settings.json | ||
.vscode/tasks.json |
File renamed without changes.
22 changes: 22 additions & 0 deletions
22
container-templates/docker-compose/dev-container.dockerfile
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,22 @@ | ||
# ************************************************************************** | ||
# * Note: A dev-container.dockerfile is optional when using Docker Compose * | ||
# * but has been included here for completeness. * | ||
# ************************************************************************** | ||
|
||
# Debian and Ubuntu based images are supported. Alpine images are not yet supported. | ||
FROM ubuntu:1804 | ||
|
||
# Install common tools developers typically will need like git | ||
RUN apt-get update \ | ||
&& apt-get install -y git | ||
|
||
# ***************************************************** | ||
# * Add steps for installing needed dependencies here * | ||
# ***************************************************** | ||
|
||
# Clean up | ||
RUN apt-get autoremove -y \ | ||
&& apt-get clean -y \ | ||
&& apt-get autoclean -y \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
15 changes: 15 additions & 0 deletions
15
container-templates/docker-compose/docker-compose.dev-container.yml
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,15 @@ | ||
version: '3' | ||
services: | ||
your-service-name-here: | ||
build: | ||
context: . | ||
dockerfile: dev-container.dockerfile # Using a Dockerfile is optional, but included for completeness. | ||
|
||
ports: | ||
- "3000:3000" # Application port to forward | ||
|
||
volumes: | ||
- .:/app # This is where VS Code should expect to find your project's source code, value of "volume" in .vscode/devContainer.json | ||
|
||
command: sleep infinity # This prevents the container from shutting down if you stop your application | ||
|
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,9 @@ | ||
{ | ||
"name": "Dev Container Definition Template - Dockerfile", | ||
"dockerFile": "dev-container.dockerfile", | ||
"appPort": 3000, | ||
"extensions": [ | ||
"mutantdino.resourcemonitor" | ||
], | ||
"runArgs": [] | ||
} |
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,6 @@ | ||
README.md | ||
test-project | ||
.vscode/launch.json | ||
.vscode/launch.test.json | ||
.vscode/settings.json | ||
.vscode/tasks.json |
File renamed without changes.
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 @@ | ||
# Debian and Ubuntu based images are supported. Alpine images are not yet supported. | ||
FROM ubuntu:1804 | ||
|
||
# Install common tools developers typically will need | ||
RUN apt-get update \ | ||
&& apt-get install -y git | ||
|
||
# ***************************************************** | ||
# * Add steps for installing needed dependencies here * | ||
# **************************************************** | ||
|
||
# Clean up | ||
RUN apt-get autoremove -y \ | ||
&& apt-get clean -y \ | ||
&& apt-get autoclean -y \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
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,9 @@ | ||
{ | ||
"name": "Dev Container Definition Template - Container Image", | ||
"image": "ubuntu:1804", | ||
"appPort": 3000, | ||
"extensions": [ | ||
"mutantdino.resourcemonitor" | ||
], | ||
"runArgs": [] | ||
} |
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,6 @@ | ||
README.md | ||
test-project | ||
.vscode/launch.json | ||
.vscode/launch.test.json | ||
.vscode/settings.json | ||
.vscode/tasks.json |
Empty file.
12 changes: 6 additions & 6 deletions
12
...e-cli-container/.vscode/devContainer.json → ...iners/azure-cli/.vscode/devContainer.json
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "Azure CLI", | ||
"dockerFile": "dev-container.dockerfile", | ||
"extensions": [ | ||
"ms-vscode.azurecli" | ||
] | ||
{ | ||
"name": "Azure CLI", | ||
"dockerFile": "dev-container.dockerfile", | ||
"extensions": [ | ||
"ms-vscode.azurecli" | ||
] | ||
} |
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,6 @@ | ||
README.md | ||
test-project | ||
.vscode/launch.json | ||
.vscode/launch.test.json | ||
.vscode/settings.json | ||
.vscode/tasks.json |
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,18 @@ | ||
FROM debian | ||
|
||
# Install git | ||
RUN apt-get update && apt-get -y install git | ||
|
||
# Install the Azure CLI | ||
RUN apt-get install -y apt-transport-https curl gnupg2 lsb-release \ | ||
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \ | ||
&& curl -L https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \ | ||
&& apt-get update \ | ||
&& apt-get install -y azure-cli | ||
|
||
# Clean up | ||
RUN apt-get autoremove -y \ | ||
&& apt-get clean -y \ | ||
&& apt-get autoclean -y \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
10 changes: 5 additions & 5 deletions
10
...iners/azure-cli-container/scripting.azcli → ...rs/azure-cli/test-project/scripting.azcli
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
az login | ||
az account list -o table | ||
az account set -s 'Try Out Subscription' | ||
az functionapp list -o table | ||
az login | ||
az account list -o table | ||
az account set -s 'Try Out Subscription' | ||
|
||
az functionapp list -o table |
14 changes: 7 additions & 7 deletions
14
...ction-container/.vscode/devContainer.json → ...unctions-node-8/.vscode/devContainer.json
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"name": "Azure Functions & Node.js", | ||
"dockerFile": "dev-container.dockerfile", | ||
"appPort": 7071, | ||
"extensions": [ | ||
"ms-azuretools.vscode-azurefunctions" | ||
] | ||
{ | ||
"name": "Azure Functions & Node.js", | ||
"dockerFile": "dev-container.dockerfile", | ||
"appPort": 7071, | ||
"extensions": [ | ||
"ms-azuretools.vscode-azurefunctions" | ||
] | ||
} |
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,6 @@ | ||
README.md | ||
test-project | ||
.vscode/launch.json | ||
.vscode/launch.test.json | ||
.vscode/settings.json | ||
.vscode/tasks.json |
42 changes: 26 additions & 16 deletions
42
...nction-container/dev-container.dockerfile → ...functions-node-8/dev-container.dockerfile
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 |
---|---|---|
@@ -1,16 +1,26 @@ | ||
FROM microsoft/dotnet:2.1-sdk-stretch | ||
|
||
# Install required tools | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y git apt-transport-https curl \ | ||
&& curl -sSL https://deb.nodesource.com/setup_8.x | bash - \ | ||
&& curl -sSO https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb \ | ||
&& dpkg -i packages-microsoft-prod.deb \ | ||
&& rm packages-microsoft-prod.deb \ | ||
&& apt-get update \ | ||
&& apt-get install -y nodejs \ | ||
&& apt-get download azure-functions-core-tools \ | ||
&& dpkg -i --force-depends azure-functions-core-tools*.deb \ | ||
&& rm azure-functions-core-tools*.deb \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
FROM microsoft/dotnet:2.1-sdk-stretch | ||
|
||
# Install git | ||
RUN apt-get update && apt-get -y install git | ||
|
||
# Install Node.js | ||
RUN apt-get install -y curl \ | ||
&& curl -sSL https://deb.nodesource.com/setup_8.x | bash - \ | ||
&& apt-get update \ | ||
&& apt-get install -y nodejs | ||
|
||
# Install Azure Functions | ||
RUN apt-get install -y apt-transport-https \ | ||
&& curl -sSO https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb \ | ||
&& dpkg -i packages-microsoft-prod.deb \ | ||
&& rm packages-microsoft-prod.deb \ | ||
&& apt-get update \ | ||
&& apt-get download azure-functions-core-tools \ | ||
&& dpkg -i --force-depends azure-functions-core-tools*.deb \ | ||
&& rm azure-functions-core-tools*.deb | ||
|
||
# Clean up | ||
RUN apt-get autoremove -y \ | ||
&& apt-get clean -y \ | ||
&& apt-get autoclean -y \ | ||
&& rm -rf /var/lib/apt/lists/* |
7 changes: 7 additions & 0 deletions
7
containers/azure-hdinsight-python-3/.vscode/devContainer.json
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,7 @@ | ||
{ | ||
"name": "Azure HDInsight", | ||
"dockerFile": "dev-container.dockerfile", | ||
"extensions": [ | ||
"mshdinsight.azure-hdinsight" | ||
] | ||
} |
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,6 @@ | ||
README.md | ||
test-project | ||
.vscode/launch.json | ||
.vscode/launch.test.json | ||
.vscode/settings.json | ||
.vscode/tasks.json |
15 changes: 15 additions & 0 deletions
15
containers/azure-hdinsight-python-3/dev-container.dockerfile
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,15 @@ | ||
# HDInsight extension needs mono | ||
FROM mono:5 | ||
|
||
# Install git tools | ||
RUN apt-get update \ | ||
&& apt-get install -y git | ||
|
||
# Install python 3 | ||
RUN apt-get install -y python3 python3-pip | ||
|
||
# Clean up | ||
RUN apt-get autoremove -y \ | ||
&& apt-get clean -y \ | ||
&& apt-get autoclean -y \ | ||
&& rm -rf /var/lib/apt/lists/* |
8 changes: 8 additions & 0 deletions
8
containers/azure-machine-learning-python-3/.vscode/devContainer.json
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,8 @@ | ||
{ | ||
"name": "Azure Machine Learning", | ||
"dockerFile": "dev-container.dockerfile", | ||
"extensions": [ | ||
"ms-toolsai.vscode-ai" | ||
], | ||
"runArgs": ["-v","/var/run/docker.sock:/var/run/docker.sock"] | ||
} |
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,6 @@ | ||
README.md | ||
test-project | ||
.vscode/launch.json | ||
.vscode/launch.test.json | ||
.vscode/settings.json | ||
.vscode/tasks.json |
21 changes: 21 additions & 0 deletions
21
containers/azure-machine-learning-python-3/dev-container.dockerfile
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,21 @@ | ||
FROM python:3.7-slim | ||
|
||
# Install required tools | ||
RUN apt-get update \ | ||
&& apt-get install -y git | ||
|
||
# Install Docker CE - ** COMMENT OUT IF YOU WILL ONLY RUN LOCAL OR IN AZURE ** | ||
RUN apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common \ | ||
&& curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - \ | ||
&& add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" \ | ||
&& apt-get update \ | ||
&& apt-get install -y docker-ce-cli | ||
|
||
# Install pylint | ||
RUN pip install pylint | ||
|
||
# Clean up | ||
RUN apt-get autoremove -y \ | ||
&& apt-get clean -y \ | ||
&& apt-get autoclean -y \ | ||
&& rm -rf /var/lib/apt/lists/* |
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,8 @@ | ||
{ | ||
"name": "Azure Terraform", | ||
"dockerFile": "dev-container.dockerfile", | ||
"extensions": [ | ||
"mauve.terraform", | ||
"ms-azuretools.azureterraform" | ||
] | ||
} |
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,6 @@ | ||
README.md | ||
test-project | ||
.vscode/launch.json | ||
.vscode/launch.test.json | ||
.vscode/settings.json | ||
.vscode/tasks.json |
Oops, something went wrong.