Skip to content

Commit d98b0e3

Browse files
committed
Add docker login to dind for internal registry access
The host Docker daemon is authenticated via the runner's job-started hook, but the dind service is a separate daemon with no auth config. Log in to docker.internal.networkradius.com via dind before pulling. Secrets are passed via env vars to avoid shell interpolation.
1 parent efecac8 commit d98b0e3

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/ci-multi-server-tests.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,17 @@ jobs:
204204
with:
205205
lfs: false
206206

207+
# Authenticate to the internal registry via the dind daemon.
208+
# The host Docker daemon is logged in via the runner's
209+
# job-started hook, but dind is a separate daemon with no
210+
# auth config.
211+
- name: Login to internal Docker registry
212+
env:
213+
DOCKER_USERNAME: ${{ secrets.DOCKER_REPO_USERNAME }}
214+
DOCKER_PASSWORD: ${{ secrets.DOCKER_REPO_PASSWORD }}
215+
run: |
216+
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin https://docker.internal.networkradius.com/
217+
207218
- name: Get pre-built Docker image for self-hosted runner test
208219
shell: bash
209220
env:

0 commit comments

Comments
 (0)