This repository was archived by the owner on Nov 30, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +35
-6
lines changed
container-templates/docker-compose/.devcontainer
docker-existing-docker-compose/.devcontainer
docker-in-docker-compose/.devcontainer
javascript-node-lts-mongo/.devcontainer
python-3-postgres/.devcontainer Expand file tree Collapse file tree 5 files changed +35
-6
lines changed Original file line number Diff line number Diff line change 6
6
version : ' 3'
7
7
services :
8
8
your-service-name-here :
9
+ # Using a Dockerfile is optional, but included for completeness.
9
10
build :
10
11
context : .
11
- dockerfile : .devcontainer/Dockerfile # Using a Dockerfile is optional, but included for completeness.
12
+ dockerfile : .devcontainer/Dockerfile
12
13
14
+ # Application port(s) to expose
13
15
ports :
14
- - " 3000:3000" # Application port to forward
16
+ - " 3000:3000"
15
17
16
18
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
18
22
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
20
25
26
+ # Overrides default command so things don't shut down after the process ends - useful for debugging
27
+ command : sleep infinity
28
+
Original file line number Diff line number Diff line change @@ -20,10 +20,13 @@ services:
20
20
# Update this to wherever you want VS Code to mount the folder of your project
21
21
- ..:/workspace
22
22
23
+ # This lets you avoid setting up Git again in the container
24
+ - ~/.gitconfig:/root/.gitconfig
25
+
23
26
# Forwarding the socket is optional, but lets docker work inside the container if you install the Docker CLI.
24
27
# See the docker-in-docker-compose definition for details on how to install it.
25
28
- /var/run/docker.sock:/var/run/docker.sock
26
29
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
28
31
command : sleep infinity
29
32
Original file line number Diff line number Diff line change @@ -10,9 +10,14 @@ services:
10
10
context : .
11
11
dockerfile : Dockerfile
12
12
volumes :
13
+ # Update this to wherever you want VS Code to mount the folder of your project
13
14
- ..:/workspace
14
15
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.
16
21
- /var/run/docker.sock:/var/run/docker.sock
17
22
18
23
# Overrides default command so things don't shut down after the process ends - useful for debugging
Original file line number Diff line number Diff line change @@ -9,11 +9,18 @@ services:
9
9
build :
10
10
context : .
11
11
dockerfile : Dockerfile
12
+
12
13
volumes :
13
14
- ..:/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
14
19
command : sleep infinity
20
+
15
21
links :
16
22
- mongo
23
+
17
24
mongo :
18
25
image : mongo
19
26
volumes :
Original file line number Diff line number Diff line change @@ -5,9 +5,15 @@ services:
5
5
build :
6
6
context : ..
7
7
dockerfile : .devcontainer/Dockerfile
8
+
8
9
volumes :
9
10
- ..:/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
10
15
command : sleep infinity
16
+
11
17
db :
12
18
image : postgres
13
19
restart : always
You can’t perform that action at this time.
0 commit comments