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

Commit

Permalink
Updated compose example assuming support of array of compose files
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuxel committed Mar 29, 2019
1 parent 5d9aca6 commit 1fa3e3d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
your-service-name-here:
build:
context: .
dockerfile: Dockerfile # Using a Dockerfile is optional, but included for completeness.
dockerfile: .devcontainer/Dockerfile # Using a Dockerfile is optional, but included for completeness.

ports:
- "3000:3000" # Application port to forward
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,10 @@
# Licensed under the MIT License. See LICENSE in the project root for license information.
#-----------------------------------------------------------------------------------------

version: '2.1'
version: '3'
services:
devcontainer:
extends:
# Update this to the name of the service you want to work with in your docker-compose.yml file
service: your-service-name-here

# Update this if you have Docker Compose file with a different name
file: docker-compose.yml

# Update this to the name of the service you want to work with in your docker-compose.yml file
your-service-name-here:
volumes:
# Update this to wherever you want VS Code to mount the folder of your project
- .:/workspace
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
{
"name": "Existing Docker Compose",

"// Most of the configuration is in this .devcontainer/docker-compose.yml file":"",
"dockerComposeFile": ".devcontainer/docker-compose.yml",
"// Update this list if you have more compose files or use different names. The": "",
"// .devcontainer/docker-compose.yml file contains any overrides you need/want to make.":"",
"dockerComposeFile": [
"docker-compose.yml",
".devcontainer/docker-compose.yml"
],

"// The service property is the name of the service that extends your existing service": "",
"// in .devcontainer/docker-compose.yml. Update the real service name and file path there.":"",
"service": "devcontainer",
"// The service property is the name of the service for the container that VS Code should": "",
"// use. Update this value and .devcontainer/docker-compose.yml to the real service name.":"",
"service": "your-service-name-here",

"// The volume property is the path VS Code should open by default when connected to the service.": "",
"// This is typically a file mount in .devcontainer/docker-compose.yml":"",
Expand Down

0 comments on commit 1fa3e3d

Please sign in to comment.