From 50cf3c22955d93e1672178506e9a30a0c1ba7891 Mon Sep 17 00:00:00 2001 From: Steven Maude Date: Tue, 28 May 2024 15:41:01 +0100 Subject: [PATCH 1/3] Remove docker-in-docker options that are defaults These four removed options are currently the default configuration for the feature. If we need to override the defaults in future, then we should do that. Reference: https://github.com/devcontainers/features/blob/f5787eed01022f177475a99084327e023a84ddaf/src/docker-in-docker/README.md These explicit options were added in ef7549f48bee0debf63e97a87a93feb8e5ea1e0a and that in turn was because Visual Studio Code added them in when creating the dev container configuration. For context, * `moby` specifies whether use Moby instead of Docker CE * `version` specifies the Moby/Docker CE version * `azureDnsAutoDetection` sets the DNS server for `dockerd` if running in Azure (Actions runners are hosted in Azure, not sure if this setting makes any difference for our use) * `installDockerBuildx`: installs Docker Buildx (which is used by Docker Buildkit); not convinced there's anywhere we use this for OpenSAFELY CLI, but it shouldn't do any harm to have it installed --- .devcontainer/devcontainer.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 7d59d93..08abd30 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -6,10 +6,6 @@ // 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" } }, From 96b073eed496c8bef928018483ceb03bee36a927 Mon Sep 17 00:00:00 2001 From: Steven Maude Date: Tue, 28 May 2024 15:46:55 +0100 Subject: [PATCH 2/3] Unpin Docker Compose version This setting came from it being added via Visual Studio Code in ef7549f48bee0debf63e97a87a93feb8e5ea1e0a. The latest is currently v2. Also don't know of any reason why we currently would want to pin this: I'm not aware that we use Docker Compose whether in our research-template setup, or in tools like OpenSAFELY CLI. --- .devcontainer/devcontainer.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 08abd30..dd928fd 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,9 +5,7 @@ "image": "ghcr.io/opensafely-core/research-template:v0", // Features to add to the dev container. More info: https://containers.dev/features. "features": { - "ghcr.io/devcontainers/features/docker-in-docker:2": { - "dockerDashComposeVersion": "v2" - } + "ghcr.io/devcontainers/features/docker-in-docker:2": {} }, "postCreateCommand": "/bin/bash .devcontainer/postCreate.sh ${containerWorkspaceFolder}", "postAttachCommand": { From 7b3ef11cf321784c5526b9f9704d6ecafda074ed Mon Sep 17 00:00:00 2001 From: Steven Maude Date: Tue, 28 May 2024 15:49:53 +0100 Subject: [PATCH 3/3] Tidy up whitespace at end of file --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index dd928fd..f9dd068 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -54,4 +54,4 @@ "remoteEnv": { "MAX_WORKERS": "2" } -} \ No newline at end of file +}