Switch to docker experimental ...

This commit is contained in:
Matthias 2020-05-26 06:56:09 +02:00
parent 7f5feab5cf
commit 500ce50153
2 changed files with 10 additions and 2 deletions

View File

@ -264,6 +264,14 @@ jobs:
run: |
build_helpers/publish_docker.sh
# We need docker experimental to pull the ARM image.
- name: Switch docker to experimental
run: |
docker version -f '{{.Server.Experimental}}'
echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json
sudo systemctl restart docker
docker version -f '{{.Server.Experimental}}'
- name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1

View File

@ -16,8 +16,8 @@ if [ "${GITHUB_EVENT_NAME}" = "schedule" ]; then
else
echo "event ${GITHUB_EVENT_NAME}: building with cache"
# Pull last build to avoid rebuilding the whole image
docker pull --platform ${PI_PLATFORM} ${IMAGE_NAME}:${TAG}
docker buildx build --cache-from ${IMAGE_NAME}:${TAG} -f Dockerfile.armhf --platform ${PI_PLATFORM} -t ${IMAGE_NAME}:${TAG} --push .
# docker pull --platform ${PI_PLATFORM} ${IMAGE_NAME}:${TAG}
docker buildx build --cache-from=type=registry,ref=${IMAGE_NAME}:${TAG} -f Dockerfile.armhf --platform ${PI_PLATFORM} -t ${IMAGE_NAME}:${TAG} --push .
fi
if [ $? -ne 0 ]; then