Skip to content

Commit 2a288db

Browse files
jupblbampcode-com
andauthored
Fix Docker build context for base image in GitHub workflow (#239)
The base image was built locally but not accessible to subsequent build steps. Added build-contexts to pass the locally-loaded base image to both autoindex and scip-ruby image builds, resolving the 'pull access denied' error. Co-authored-by: Amp <[email protected]>
1 parent 686bf54 commit 2a288db

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/publish-docker.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ jobs:
3636
- uses: actions/checkout@v4
3737
with:
3838
ref: ${{ env.TAG }}
39-
- uses: docker/setup-buildx-action@v3
39+
- name: Set up Docker Buildx
40+
id: buildx
41+
uses: docker/setup-buildx-action@v3
42+
with:
43+
driver: docker
4044
- name: Login to DockerHub
4145
uses: docker/login-action@v3
4246
with:
@@ -46,6 +50,7 @@ jobs:
4650
id: docker_build_base
4751
uses: docker/build-push-action@v6
4852
with:
53+
builder: ${{ steps.buildx.outputs.name }}
4954
file: Dockerfile.base
5055
push: false
5156
load: true
@@ -57,8 +62,11 @@ jobs:
5762
id: docker_build_autoindex
5863
uses: docker/build-push-action@v6
5964
with:
65+
builder: ${{ steps.buildx.outputs.name }}
6066
file: Dockerfile.autoindex
6167
push: true
68+
build-contexts: |
69+
scip-ruby-base=docker-image://scip-ruby-base:${{ env.PATCH }}
6270
build-args: |
6371
BASE_TAG=${{ env.PATCH }}
6472
tags: |
@@ -70,8 +78,11 @@ jobs:
7078
id: docker_build_scip_ruby
7179
uses: docker/build-push-action@v6
7280
with:
81+
builder: ${{ steps.buildx.outputs.name }}
7382
file: Dockerfile
7483
push: true
84+
build-contexts: |
85+
scip-ruby-base=docker-image://scip-ruby-base:${{ env.PATCH }}
7586
build-args: |
7687
BASE_TAG=${{ env.PATCH }}
7788
tags: |

0 commit comments

Comments
 (0)