Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions examples/compose/.devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
{
"dockerComposeFile": "docker-compose.devcontainer.yml",
"service": "app",
"runServices": ["app2"],
"workspaceFolder": "/workspaces",
"features":{
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/node:1": {
"installYarnUsingApt": true,
"version": "lts",
"nvmVersion": "latest"
}
},
"forwardPorts": [1337, "db:5432"]
"dockerComposeFile": "docker-compose.devcontainer.yml",
"service": "app",
"runServices": ["app2"],
"workspaceFolder": "/workspaces",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/node:1": {
"installYarnUsingApt": true,
"version": "lts",
"nvmVersion": "latest"
}
},
"onCreateCommand": {
"init": "onCreateCommand.sh"
},
"forwardPorts": [1337, "db:5432"]
}
2 changes: 1 addition & 1 deletion examples/compose/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Docker Compose Example

This folder holds a simple devcontainer configuration that uses docker-compose to start and build several services.
This folder holds a simple devcontainer configuration that uses docker-compose to start and build several services. It also has the known hosts for GitHub avoiding the need to add these on first connection.

You can start this project via:
```
Expand Down
4 changes: 4 additions & 0 deletions examples/compose/known_hosts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl
github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=
github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=

5 changes: 5 additions & 0 deletions examples/compose/onCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Setup SSH config to avoid fingerprint prompts
mkdir -p ~/.ssh
cp known_hosts ~/.ssh/known_hosts
chmod 700 ~/.ssh
chmod 600 ~/.ssh/known_hosts