From 355ec105eacb3a5f60f89a618f19c58eb3aff02e Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Thu, 9 Jul 2026 22:39:21 -0700 Subject: [PATCH] fix(devcontainer): bump docker-in-docker, introduce lockfile [A PR was opened which fixed docker-in-docker for Ubuntu 26.04](https://github.com/devcontainers/features/pull/1637), which was merged on May 12th and was a minor version bump for docker-in-docker version 2, but [this caused a regression on Ubuntu/**Debian** backends for hosts whose kernel does not load the `ip_tables` kernel module by default (e.g. RHEL-based distributions like Fedora)](https://github.com/devcontainers/features/issues/1659). Our anaconda base image happens to be a Debian-based image, and I happen to be running on a host which does not load the `ip_tables` kernel module by default. We fix this by both: 1. Bumping docker-in-docker 2. Adding an associated lockfile which pins devcontainer features, while also pinning the base anaconda image version. _Reviewers: Make sure to test this in a devcontainer/codespace as well to make sure this works!_ --- .devcontainer/Dockerfile | 2 +- .devcontainer/devcontainer-lock.json | 14 ++++++++++++++ .devcontainer/devcontainer.json | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .devcontainer/devcontainer-lock.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 07dabe928..32d5f3d21 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/devcontainers/anaconda:1-3 +FROM mcr.microsoft.com/devcontainers/anaconda:1.3.22-3 # Install dependencies necessary to build Singularity RUN sudo apt-get update && sudo apt-get install -y \ diff --git a/.devcontainer/devcontainer-lock.json b/.devcontainer/devcontainer-lock.json new file mode 100644 index 000000000..566f70dd7 --- /dev/null +++ b/.devcontainer/devcontainer-lock.json @@ -0,0 +1,14 @@ +{ + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:4": { + "version": "4.0.0", + "resolved": "ghcr.io/devcontainers/features/docker-in-docker@sha256:4fa87399214366e320d489991769c4f3f461e1ffe461f54eea78a41b34945bb5", + "integrity": "sha256:4fa87399214366e320d489991769c4f3f461e1ffe461f54eea78a41b34945bb5" + }, + "ghcr.io/devcontainers/features/go:1": { + "version": "1.3.4", + "resolved": "ghcr.io/devcontainers/features/go@sha256:d85e921f91b41340055bb12b325d9d551170ed04b3b832e33530bf42f167c032", + "integrity": "sha256:d85e921f91b41340055bb12b325d9d551170ed04b3b832e33530bf42f167c032" + } + } +} diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 619f20cc8..ca8b3299a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -10,7 +10,7 @@ "dockerfile": "Dockerfile" }, "features": { - "ghcr.io/devcontainers/features/docker-in-docker:2": {}, + "ghcr.io/devcontainers/features/docker-in-docker:4": {}, // For building singularity "ghcr.io/devcontainers/features/go:1": {} },