This repository has been archived by the owner on Nov 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added existing dockerfile / docker-compose definitions
- Loading branch information
Showing
8 changed files
with
107 additions
and
3 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
containers/docker-existing-docker-compose/.devcontainer/docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#----------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See LICENSE in the project root for license information. | ||
#----------------------------------------------------------------------------------------- | ||
|
||
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 | ||
|
||
volumes: | ||
# Update this to wherever you want VS Code to mount the folder of your project | ||
- .:/workspace | ||
|
||
# Forwarding the socket is optional, but lets docker work inside the container if you install the Docker CLI. | ||
# See the docker-in-docker-compose definition for details on how to install it. | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
|
||
# Overrides default command so things don't shut down after the process ends. Optional, but useful for debugging. | ||
command: sleep infinity | ||
|
5 changes: 5 additions & 0 deletions
5
containers/docker-existing-docker-compose/.devcontainer/ignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
README.md | ||
test-project | ||
.vscode | ||
!.vscode/devContainer.json | ||
!.vscode/devcontainer.json |
14 changes: 14 additions & 0 deletions
14
containers/docker-existing-docker-compose/.vscode/devContainer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "Existing Docker Compose", | ||
|
||
// Most of the configuration is in the .devcontainer/docker-compose.yml file | ||
"dockerComposeFile": ".devcontainer/docker-compose.yml", | ||
|
||
// This is the name of the service that extends from your existing service. Set the | ||
// real service name in .devcontainer/docker-compose.yml | ||
"service": "devcontainer", | ||
|
||
// Path to where VS Code should start when connected to the service. This is typically | ||
// a file mount in .devcontainer/docker-compose.yml | ||
"volume": "workspace" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Existing Docker Compose | ||
|
||
## Summary | ||
|
||
*Illustrates you can reuse an existing docker-compose.yml for your dev container.* | ||
|
||
| Metadata | Value | | ||
|----------|-------| | ||
| *Contributors* | The VS Code team | | ||
| *Definition type* | Docker Compose | | ||
| *Languages, platforms* | Any | | ||
|
||
> **Note:** There is also a single [Dockerfile](../docker-existing-dockerfile) variation of this same definition. | ||
## License | ||
|
||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
|
||
Licensed under the MIT License. See [LICENSE](../../LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
README.md | ||
test-project | ||
.vscode | ||
!.vscode/devContainer.json | ||
!.vscode/devcontainer.json |
14 changes: 14 additions & 0 deletions
14
containers/docker-existing-dockerfile/.vscode/devContainer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "Existing Dockerfile", | ||
|
||
// Update this if you aren't using the standard "Dockerfile" filename | ||
"dockerFile": "Dockerfile", | ||
|
||
// List any ports you want to expose that aren't already exposed in your Dockerfile | ||
"appPort": [], | ||
|
||
// If you install the Docker CE CLI in your container, this lets you interact with your host | ||
// Docker service from inside the container. See the docker-in-docker and docker-in-docker-compose | ||
// definitions for details. | ||
"runArgs": ["-v","/var/run/docker.sock:/var/run/docker.sock"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Existing Dockerfile | ||
|
||
# Existing Docker Compose | ||
|
||
## Summary | ||
|
||
*Illustrates you can reuse an existing docker-compose.yml for your dev container.* | ||
|
||
| Metadata | Value | | ||
|----------|-------| | ||
| *Contributors* | The VS Code team | | ||
| *Definition type* | Dockerfile | | ||
| *Languages, platforms* | Any | | ||
|
||
> **Note:** There is also a [Docker Compose](../docker-existing-docker-compose) variation of this same definition. | ||
## License | ||
|
||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
|
||
Licensed under the MIT License. See [LICENSE](../../LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters