Skip to content

Commit

Permalink
Merge pull request #105 from opensafely/iaindillingham/hide-requireme…
Browse files Browse the repository at this point in the history
…nts-for-dev-containers

Hide requirements for dev containers
  • Loading branch information
iaindillingham authored Sep 4, 2023
2 parents 201d7dc + 3e694c4 commit 2863504
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 40 deletions.
74 changes: 34 additions & 40 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,39 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
// 2023-06-29: Use bullseye image instead of bookworm.
// At time of writing, bookworm is new and may have issues with dev containers:
// https://github.com/devcontainers/features/issues/576
"image": "mcr.microsoft.com/devcontainers/python:3.11-bullseye",

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"moby": true,
"azureDnsAutoDetection": true,
"installDockerBuildx": true,
"version": "latest",
"dockerDashComposeVersion": "v2"
}
},

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

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pip3 install --user -r requirements.in",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-toolsai.jupyter",
"ms-toolsai.jupyter-renderers"
]
}
},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"

"remoteEnv": {
"MAX_WORKERS": 2
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
// 2023-06-29: Use bullseye image instead of bookworm.
// At time of writing, bookworm is new and may have issues with dev containers:
// https://github.com/devcontainers/features/issues/576
"image": "mcr.microsoft.com/devcontainers/python:3.11-bullseye",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"moby": true,
"azureDnsAutoDetection": true,
"installDockerBuildx": true,
"version": "latest",
"dockerDashComposeVersion": "v2"
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pip3 install --user -r .devcontainer/requirements.in",
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-toolsai.jupyter",
"ms-toolsai.jupyter-renderers"
]
}
},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
"remoteEnv": {
"MAX_WORKERS": 2
}
}
File renamed without changes.

0 comments on commit 2863504

Please sign in to comment.