Skip to content

Commit 8722aa8

Browse files
committed
Dev container from docker-compose
1 parent f861003 commit 8722aa8

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

.devcontainer/devcontainer.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
22
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
33
{
4-
"name": "Existing Dockerfile",
5-
"build": {
6-
// Sets the run context to one level up instead of the .devcontainer folder.
7-
"context": "..",
8-
"dockerfile": "../Dockerfile",
9-
"target": "dev_container"
10-
},
4+
"name": "members-app",
5+
"dockerComposeFile": "docker-compose.yaml",
6+
"service": "app",
7+
"workspaceFolder": "/workspace",
8+
"shutdownAction": "stopCompose"
119

1210
// Features to add to the dev container. More info: https://containers.dev/features.
13-
"features": {}
11+
// "features": {}
1412

1513
// Use 'forwardPorts' to make a list of ports inside the container available locally.
1614
// "forwardPorts": [],

.devcontainer/docker-compose.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
services:
2+
app:
3+
build:
4+
context: ../
5+
target: dev_container
6+
dockerfile: Dockerfile
7+
volumes:
8+
- ../:/workspace:cached
9+
command: /bin/sh -c "while sleep 1000; do :; done"

0 commit comments

Comments
 (0)