Skip to content

Commit 40c0a92

Browse files
Merge pull request #1048 from VWS-Python/buildx
Add Docker buildx stage
2 parents ed8cfae + 2b753ae commit 40c0a92

File tree

3 files changed

+30
-7
lines changed

3 files changed

+30
-7
lines changed

.github/workflows/docker-build.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
name: Build Docker images
44

55
# This matches the Docker image building done in the release process.
6+
#
7+
# It is possible to use https://github.com/nektos/act to run this workflow.
68

79
on:
810
push:
@@ -22,31 +24,42 @@ jobs:
2224
steps:
2325
- uses: actions/checkout@v2
2426

27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v1
29+
with:
30+
# This defaults to "docker-containerized".
31+
# We want to share the vws-mock:base image to the building of the
32+
# later builds, without pushing to a registry.
33+
#
34+
# Therefore, we choose not to build in a container.
35+
driver: docker
36+
2537
- name: Build base Docker image
2638
uses: docker/[email protected]
2739
with:
40+
buildkitd-flags: --debug
2841
file: src/mock_vws/_flask_server/dockerfiles/base/Dockerfile
2942
push: false
3043
tags: |
3144
vws-mock:base
3245
33-
- name: Build and push target manager Docker image
46+
- name: Build target manager Docker image
3447
uses: docker/[email protected]
3548
with:
3649
file: src/mock_vws/_flask_server/dockerfiles/target_manager/Dockerfile
3750
push: false
3851
tags: |
3952
adamtheturtle/vuforia-target-manager-mock:latest
4053
41-
- name: Build and push VWS Docker image
54+
- name: Build VWS Docker image
4255
uses: docker/[email protected]
4356
with:
4457
file: src/mock_vws/_flask_server/dockerfiles/vws/Dockerfile
4558
push: false
4659
tags: |
4760
adamtheturtle/vuforia-vws-mock:latest
4861
49-
- name: Build and push VWQ Docker image
62+
- name: Build VWQ Docker image
5063
uses: docker/[email protected]
5164
with:
5265
file: src/mock_vws/_flask_server/dockerfiles/vwq/Dockerfile

.github/workflows/release.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,16 @@ jobs:
8181
username: ${{ secrets.DOCKERHUB_USERNAME }}
8282
password: ${{ secrets.DOCKERHUB_TOKEN }}
8383

84+
- name: Set up Docker Buildx
85+
uses: docker/setup-buildx-action@v1
86+
with:
87+
# This defaults to "docker-containerized".
88+
# We want to share the vws-mock:base image to the building of the
89+
# later builds, without pushing to a registry.
90+
#
91+
# Therefore, we choose not to build in a container.
92+
driver: docker
93+
8494
- name: Build base Docker image
8595
uses: docker/[email protected]
8696
with:

docs/source/docker.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Building images from source
143143
export VWS_TAG=adamtheturtle/vuforia-vws-mock:latest
144144
export VWQ_TAG=adamtheturtle/vuforia-vwq-mock:latest
145145

146-
docker build $REPOSITORY_ROOT --file $BASE_DOCKERFILE --tag $BASE_TAG
147-
docker build $REPOSITORY_ROOT --file $TARGET_MANAGER_DOCKERFILE --tag $TARGET_MANAGER_TAG
148-
docker build $REPOSITORY_ROOT --file $VWS_DOCKERFILE --tag $VWS_TAG
149-
docker build $REPOSITORY_ROOT --file $VWQ_DOCKERFILE --tag $VWQ_TAG
146+
docker buildx build $REPOSITORY_ROOT --file $BASE_DOCKERFILE --tag $BASE_TAG
147+
docker buildx build $REPOSITORY_ROOT --file $TARGET_MANAGER_DOCKERFILE --tag $TARGET_MANAGER_TAG
148+
docker buildx build $REPOSITORY_ROOT --file $VWS_DOCKERFILE --tag $VWS_TAG
149+
docker buildx build $REPOSITORY_ROOT --file $VWQ_DOCKERFILE --tag $VWQ_TAG

0 commit comments

Comments
 (0)