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.
- Loading branch information
Showing
30 changed files
with
575 additions
and
518 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 |
---|---|---|
@@ -1,11 +1,32 @@ | ||
# 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 definition** files such as `devContainer.json` that can be added to existing projects to quickly get up and running inside a containerized environment. | ||
|
||
## Trying a definition | ||
|
||
1. Check out the README for the definition folder under `definitions` to see if there are any manual steps | ||
2. Clone this repository or copy the contents of the folder to your machine | ||
3. Run the **Remote: Open Folder in Container...** command in VS Code | ||
4. Select the definition folder | ||
|
||
Many definitions come with a `test-project` that you can use to see everything working. | ||
|
||
## Using a definition | ||
|
||
Run the **Remote: Create Container Configuration File...** command in VS Code or manually copy the contents of one of the `definitions` sub-folders into your project. | ||
|
||
When manually copying, note that some definitions contain a `test-project`, `.vscode/launch.json`, `.vscode/settings.json` or `.vscode/tasks.json` file that can be omitted. | ||
|
||
## Contents | ||
|
||
- `definitions` - Dev container definition folders. | ||
- `definitions-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. |
14 changes: 7 additions & 7 deletions
14
...-functions-node/.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" | ||
] | ||
} |
File renamed without changes.
52 changes: 26 additions & 26 deletions
52
...e-functions-node/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,26 +1,26 @@ | ||
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/* | ||
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/* |
This file was deleted.
Oops, something went wrong.
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,4 +1,4 @@ | ||
FROM golang:1.11.1 | ||
FROM golang:1 | ||
|
||
RUN go get -u -v \ | ||
github.com/mdempsky/gocode \ | ||
|
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,11 @@ | ||
{ | ||
"name": "Node.js & Mongo DB", | ||
"dockerComposeFile": "docker-compose.dev-container.yml", | ||
"appPort": 3000, | ||
"devPort": 8000, | ||
"service": "app", | ||
"volume": "app", | ||
"extensions": [ | ||
"dbaeumer.vscode-eslint" | ||
] | ||
} |
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,13 @@ | ||
FROM node:8-slim | ||
|
||
# Install git | ||
RUN apt-get update && apt-get -y install git | ||
|
||
# Install eslint | ||
RUN npm install -g eslint | ||
|
||
# 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,21 @@ | ||
version: '3' | ||
services: | ||
app: | ||
build: | ||
context: . | ||
dockerfile: dev-container.dockerfile | ||
ports: | ||
- "3000:3000" | ||
- "8000:8000" | ||
volumes: | ||
- .:/app | ||
command: sleep infinity | ||
links: | ||
- mongo | ||
mongo: | ||
image: mongo | ||
ports: | ||
- "27017:27017" | ||
volumes: | ||
- /data/db | ||
|
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,5 @@ | ||
FROM node:8 | ||
ADD . /app | ||
WORKDIR /app | ||
RUN npm install | ||
CMD ["node", "server.js"] |
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 @@ | ||
version: '3' | ||
services: | ||
app: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
ports: | ||
- "3000:3000" | ||
links: | ||
- mongo | ||
mongo: | ||
image: mongo | ||
ports: | ||
- "27017:27017" | ||
volumes: | ||
- /data/db | ||
|
File renamed without changes.
File renamed without changes.
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,8 @@ | ||
{ | ||
"name": "Node.js 8", | ||
"dockerFile": "dev-container.dockerfile", | ||
"appPort": 3000, | ||
"extensions": [ | ||
"dbaeumer.vscode-eslint" | ||
] | ||
} |
26 changes: 13 additions & 13 deletions
26
definitions/node/.vscode/launch.json → definitions/node-8/.vscode/launch.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,14 +1,14 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Launch Program", | ||
"program": "${workspaceFolder}/test-project/server.js" | ||
} | ||
] | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Launch Program", | ||
"program": "${workspaceFolder}/test-project/server.js" | ||
} | ||
] | ||
} |
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,13 @@ | ||
FROM node:8-slim | ||
|
||
# Install git | ||
RUN apt-get update && apt-get -y install git | ||
|
||
# Install eslint | ||
RUN npm install -g eslint | ||
|
||
# Clean up | ||
RUN apt-get autoremove -y \ | ||
&& apt-get clean -y \ | ||
&& apt-get autoclean -y \ | ||
&& rm -rf /var/lib/apt/lists/* |
42 changes: 21 additions & 21 deletions
42
definitions/node/test-project/.eslintrc.json → ...itions/node-8/test-project/.eslintrc.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,21 +1,21 @@ | ||
{ | ||
"root": true, | ||
"env": { | ||
"node": true, | ||
"es6": true | ||
}, | ||
"rules": { | ||
"no-console": 0, | ||
"eqeqeq":"warn", | ||
"no-cond-assign": 0, | ||
"no-unused-vars": 1, | ||
"no-extra-semi": "warn", | ||
"semi": "warn" | ||
}, | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"experimentalObjectRestSpread": true | ||
} | ||
} | ||
} | ||
{ | ||
"root": true, | ||
"env": { | ||
"node": true, | ||
"es6": true | ||
}, | ||
"rules": { | ||
"no-console": 0, | ||
"eqeqeq":"warn", | ||
"no-cond-assign": 0, | ||
"no-unused-vars": 1, | ||
"no-extra-semi": "warn", | ||
"semi": "warn" | ||
}, | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"experimentalObjectRestSpread": true | ||
} | ||
} | ||
} |
Oops, something went wrong.