diff --git a/TESTING.md b/TESTING.md index d57c5ec..68b366d 100644 --- a/TESTING.md +++ b/TESTING.md @@ -5,7 +5,7 @@ To test a particular devcontainer feature, say, `lazygit`: ```bash -devcontainer features test -f lazygit -i mcr.microsoft.com/devcontainers/base:ubuntu-24.04 . +devcontainer features test -f lazygit -i mcr.microsoft.com/devcontainers/base:ubuntu -p . ``` - `--skip-scenarios` ... tests only the `test.sh` test case, but no scenario tests. diff --git a/src/pull-through-cache-registry/NOTES.md b/src/pull-through-cache-registry/NOTES.md index ae5db03..4fa1116 100644 --- a/src/pull-through-cache-registry/NOTES.md +++ b/src/pull-through-cache-registry/NOTES.md @@ -10,6 +10,12 @@ In the best tradition of [dogfooding](https://en.wikipedia.org/wiki/Eating_your_own_dog_food) we use this feature to develop our features. +## Important + +- this feature depends on `ghcr.io/devcontainers/features/docker-in-docker:3`. +- at this time, it needs to set the docker-in-docker configuration parameter + `moby` to `false` in order to work on Debian 13 as well as Ubuntu 26.04. + ## OS Support As this feature relies on the [Docker-in-Docker diff --git a/src/pull-through-cache-registry/devcontainer-feature.json b/src/pull-through-cache-registry/devcontainer-feature.json index 19fee0d..bbcd7a4 100644 --- a/src/pull-through-cache-registry/devcontainer-feature.json +++ b/src/pull-through-cache-registry/devcontainer-feature.json @@ -42,6 +42,8 @@ ], "postCreateCommand": "/usr/local/bin/registry-pull-through-cache", "dependsOn": { - "ghcr.io/devcontainers/features/docker-in-docker:2": {} + "ghcr.io/devcontainers/features/docker-in-docker:3": { + "moby": false + } } } diff --git a/src/pull-through-cache-registry/install.sh b/src/pull-through-cache-registry/install.sh index 9b2450b..4b582d0 100755 --- a/src/pull-through-cache-registry/install.sh +++ b/src/pull-through-cache-registry/install.sh @@ -14,7 +14,10 @@ WAIT=${WAIT:-30} echo "installing feature registry-pull-through-cache" cat <"${REGISTRYDEPLOYSCRIPT_PATH}" -PROXY_REMOTE_URL=${PROXY_REMOTE_URL} +#!/bin/bash +set -eu + +PROXY_REMOTE_URL="${PROXY_REMOTE_URL}" PORT="${PORT}" TTL="${TTL}" REGISTRY_NAME="${REGISTRY_NAME}" @@ -23,8 +26,8 @@ timeout=${WAIT} echo "waiting up to ${WAIT}s for Docker daemon to become responsive..." while ! docker ps >/dev/null 2>&1; do sleep 1 - timeout=$((timeout-1)) - if [ "$timeout" -le 0 ]; then + timeout=\$((timeout-1)) + if [ "\$timeout" -le 0 ]; then echo "Docker did not become responsive, aborting" exit 1 fi diff --git a/test/pull-through-cache-registry/scenarios.json b/test/pull-through-cache-registry/scenarios.json index b962093..26196b7 100644 --- a/test/pull-through-cache-registry/scenarios.json +++ b/test/pull-through-cache-registry/scenarios.json @@ -1,6 +1,6 @@ { "9999": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { "pull-through-cache-registry": { "port": "9999" @@ -8,7 +8,7 @@ } }, "quay.io": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { "pull-through-cache-registry": { "proxy-remote-url": "https://quay.io"