Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit 18b824b

Browse files
committed
Merge branch 'clantz/docker-in-docker-updates' of https://github.com/Microsoft/vscode-dev-containers
2 parents 6c951b4 + 1641597 commit 18b824b

File tree

5 files changed

+35
-6
lines changed

5 files changed

+35
-6
lines changed

container-templates/docker-compose/.devcontainer/docker-compose.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,23 @@
66
version: '3'
77
services:
88
your-service-name-here:
9+
# Using a Dockerfile is optional, but included for completeness.
910
build:
1011
context: .
11-
dockerfile: .devcontainer/Dockerfile # Using a Dockerfile is optional, but included for completeness.
12+
dockerfile: .devcontainer/Dockerfile
1213

14+
# Application port(s) to expose
1315
ports:
14-
- "3000:3000" # Application port to forward
16+
- "3000:3000"
1517

1618
volumes:
17-
- ..:/workspace # This is where VS Code should expect to find your project's source code, value of "volume" in .vscode/devContainer.json
19+
# This is where VS Code should expect to find your project's source code
20+
# and the value of "workspaceFolder" in .devcontainer/devcontainer.json
21+
- ..:/workspace
1822

19-
command: sleep infinity # This prevents the container from shutting down if you stop your application
23+
# This lets you avoid setting up Git again in the container
24+
- ~/.gitconfig:/root/.gitconfig
2025

26+
# Overrides default command so things don't shut down after the process ends - useful for debugging
27+
command: sleep infinity
28+

containers/docker-existing-docker-compose/.devcontainer/docker-compose.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@ services:
2020
# Update this to wherever you want VS Code to mount the folder of your project
2121
- ..:/workspace
2222

23+
# This lets you avoid setting up Git again in the container
24+
- ~/.gitconfig:/root/.gitconfig
25+
2326
# Forwarding the socket is optional, but lets docker work inside the container if you install the Docker CLI.
2427
# See the docker-in-docker-compose definition for details on how to install it.
2528
- /var/run/docker.sock:/var/run/docker.sock
2629

27-
# Overrides default command so things don't shut down after the process ends. Optional, but useful for debugging.
30+
# Overrides default command so things don't shut down after the process ends - useful for debugging
2831
command: sleep infinity
2932

containers/docker-in-docker-compose/.devcontainer/docker-compose.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@ services:
1010
context: .
1111
dockerfile: Dockerfile
1212
volumes:
13+
# Update this to wherever you want VS Code to mount the folder of your project
1314
- ..:/workspace
1415

15-
# Forwarding the socket is the key to getting this to work
16+
# This lets you avoid setting up Git again in the container
17+
- ~/.gitconfig:/root/.gitconfig
18+
19+
# Forwarding the socket is optional, but lets docker work inside the container if you install the Docker CLI.
20+
# See the docker-in-docker-compose definition for details on how to install it.
1621
- /var/run/docker.sock:/var/run/docker.sock
1722

1823
# Overrides default command so things don't shut down after the process ends - useful for debugging

containers/javascript-node-lts-mongo/.devcontainer/docker-compose.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,18 @@ services:
99
build:
1010
context: .
1111
dockerfile: Dockerfile
12+
1213
volumes:
1314
- ..:/workspace
15+
# This lets you avoid setting up Git again in the container
16+
- ~/.gitconfig:/root/.gitconfig
17+
18+
# Overrides default command so things don't shut down after the process ends - useful for debugging
1419
command: sleep infinity
20+
1521
links:
1622
- mongo
23+
1724
mongo:
1825
image: mongo
1926
volumes:

containers/python-3-postgres/.devcontainer/docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@ services:
55
build:
66
context: ..
77
dockerfile: .devcontainer/Dockerfile
8+
89
volumes:
910
- ..:/workspace
11+
# This lets you avoid setting up Git again in the container
12+
- ~/.gitconfig:/root/.gitconfig
13+
14+
# Overrides default command so things don't shut down after the process ends - useful for debugging
1015
command: sleep infinity
16+
1117
db:
1218
image: postgres
1319
restart: always

0 commit comments

Comments
 (0)