Skip to content

Commit 6cf4c44

Browse files
committed
fix(ci): add docker-proxy binary and use dedicated DinD socket
The first canary run revealed two issues: 1. dockerd failed to start because docker-proxy was not extracted from the Docker static binary tarball. Add it to the extraction list. 2. The GitHub Actions runner injects its own Docker socket into job containers. Without an explicit DOCKER_HOST, the openshell CLI connected to the runner's host Docker daemon instead of our DinD daemon. Start dockerd on a dedicated socket (/var/run/dind.sock) and export DOCKER_HOST so all subsequent steps use it.
1 parent c33d7dc commit 6cf4c44

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.github/workflows/release-canary.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,22 @@ jobs:
7575
7676
- name: Start Docker daemon
7777
run: |
78-
# Start dockerd for Docker-in-Docker. The CI container runs
78+
# Start our own dockerd for Docker-in-Docker. The CI container runs
7979
# --privileged so the daemon can create networks and cgroups.
8080
# Using DinD means the gateway container is a child of this
8181
# container's daemon, so 127.0.0.1 port bindings are reachable
8282
# directly — no --gateway-host workaround needed.
83-
dockerd &>/var/log/dockerd.log &
84-
echo "Waiting for Docker daemon..."
85-
timeout 30 sh -c 'until docker info >/dev/null 2>&1; do sleep 1; done'
83+
#
84+
# We listen on a dedicated socket and set DOCKER_HOST so that the
85+
# openshell CLI (and bollard) connects to our DinD daemon rather
86+
# than the GitHub Actions runner's injected host socket.
87+
export DOCKER_HOST="unix:///var/run/dind.sock"
88+
dockerd --host "$DOCKER_HOST" &>/var/log/dockerd.log &
89+
echo "Waiting for Docker daemon on ${DOCKER_HOST}..."
90+
timeout 30 sh -c 'until docker --host "$DOCKER_HOST" info >/dev/null 2>&1; do sleep 1; done'
8691
echo "Docker daemon ready"
92+
# Persist DOCKER_HOST for subsequent steps
93+
echo "DOCKER_HOST=${DOCKER_HOST}" >> "$GITHUB_ENV"
8794
8895
- name: Install CLI from GitHub Release
8996
run: ./install.sh

deploy/docker/Dockerfile.ci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ RUN case "$TARGETARCH" in \
5151
&& curl -fsSL "https://download.docker.com/linux/static/stable/${docker_arch}/docker-${DOCKER_VERSION}.tgz" \
5252
| tar xz --strip-components=1 -C /usr/local/bin \
5353
docker/docker docker/dockerd docker/containerd \
54-
docker/containerd-shim-runc-v2 docker/runc \
54+
docker/containerd-shim-runc-v2 docker/runc docker/docker-proxy \
5555
&& mkdir -p /usr/local/lib/docker/cli-plugins \
5656
&& curl -fsSL "https://github.com/docker/buildx/releases/download/${BUILDX_VERSION}/buildx-${BUILDX_VERSION}.linux-${buildx_arch}" \
5757
-o /usr/local/lib/docker/cli-plugins/docker-buildx \

0 commit comments

Comments
 (0)