Skip to content

Commit f87e599

Browse files
authored
Merge pull request #624 from crazy-max/skip-pull-with-endpoint
skip BuildKit image pre-pulls for explicit endpoints
2 parents 594f3bf + e700274 commit f87e599

4 files changed

Lines changed: 26 additions & 7 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,15 @@ jobs:
182182
183183
endpoint:
184184
runs-on: ubuntu-latest
185+
strategy:
186+
fail-fast: false
187+
matrix:
188+
endpoint:
189+
- mycontext
190+
- tcp://127.0.0.1:2375
191+
env:
192+
# only the explicit endpoint should provide access to a daemon.
193+
DOCKER_HOST: unix:///tmp/nonexistent-docker.sock
185194
services:
186195
dind:
187196
image: docker:29.3-dind@sha256:4d90f1f6c400315c2dba96d3ec93c01e64198395cbba04f79d12adce4f737029
@@ -209,11 +218,19 @@ jobs:
209218
docker --context mycontext info
210219
-
211220
name: Set up Docker Buildx
221+
id: buildx
212222
uses: ./
213223
with:
214-
endpoint: mycontext
224+
endpoint: ${{ matrix.endpoint }}
225+
-
226+
name: Build
215227
env:
216-
DOCKER_CONTEXT: mycontext
228+
BUILDER: ${{ steps.buildx.outputs.name }}
229+
run: |
230+
docker buildx build --builder "$BUILDER" - <<'EOF'
231+
FROM scratch
232+
LABEL test=endpoint
233+
EOF
217234
218235
buildkitd-config:
219236
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)