1
0
Fork 0

Try again to workaround docker/buildx#395

docker
Bo Jeanes 2022-09-18 08:32:47 +10:00
parent 3c13f4da17
commit cd1e7fce37
1 changed files with 34 additions and 12 deletions

View File

@ -361,19 +361,41 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push (alpine) # Work around https://github.com/docker/buildx/issues/395
uses: docker/build-push-action@v3 # - name: create small fs for docker cache
# run: |
# df -h
# sudo swapon --show
# sudo dd if=/dev/zero of=/swapfile1 bs=1M count=6K
# sudo chmod 600 /swapfile1
# sudo mkswap /swapfile1
# sudo swapon /swapfile1
# sudo swapon --show
# sudo free -h
# sudo systemctl stop docker
# sudo mount -t tmpfs -o size=9G tmpfs /var/lib/docker
# df -h
# sudo systemctl start docker
- name: Run Docker on tmpfs
uses: JonasAlfredsson/docker-on-tmpfs@v1
with: with:
context: . tmpfs_size: 5
platforms: | swap_size: 4
linux/arm64
linux/amd64 # - name: Build and push (alpine)
push: true # uses: docker/build-push-action@v3
file: Dockerfile.alpine # with:
tags: ${{ steps.meta-alpine.outputs.tags }} # context: .
labels: ${{ steps.meta-alpine.outputs.labels }} # platforms: |
cache-from: type=gha # linux/arm64
cache-to: type=gha,mode=max # linux/amd64
# push: true
# file: Dockerfile.alpine
# tags: ${{ steps.meta-alpine.outputs.tags }}
# labels: ${{ steps.meta-alpine.outputs.labels }}
# cache-from: type=gha
# cache-to: type=gha,mode=max
- name: Build and push - name: Build and push
uses: docker/build-push-action@v3 uses: docker/build-push-action@v3
with: with: