|
1 | 1 | # Troubleshooting
|
2 | 2 |
|
3 |
| -## Errors on pushing to registry |
| 3 | +* [`auto-push is currently not implemented for docker driver`](#auto-push-is-currently-not-implemented-for-docker-driver) |
| 4 | +* [Cannot push to a registry](#cannot-push-to-a-registry) |
| 5 | + |
| 6 | +## `auto-push is currently not implemented for docker driver` |
| 7 | + |
| 8 | +If you're using the default builder (which uses the docker driver) without using our `setup-buildx-action`, you may |
| 9 | +encounter this error message if you try to push your image: |
| 10 | + |
| 11 | +``` |
| 12 | +Run docker/build-push-action@v2 |
| 13 | +📣 Buildx version: 0.4.2 |
| 14 | +🏃 Starting build... |
| 15 | +/usr/bin/docker buildx build --tag localhost:5000/name/app:latest --iidfile /tmp/docker-build-push-eYl8PB/iidfile --file ./test/Dockerfile --push ./test |
| 16 | +auto-push is currently not implemented for docker driver |
| 17 | +Error: buildx call failed with: auto-push is currently not implemented for docker driver |
| 18 | +``` |
| 19 | + |
| 20 | +While waiting for an implementation to be done on buildx/buildkit, you have the following possibilities |
| 21 | +to solve this atm: |
| 22 | + |
| 23 | +### With `docker-container` driver and `setup-buildx` |
| 24 | + |
| 25 | +> Recommended solution |
| 26 | +
|
| 27 | +```yaml |
| 28 | +jobs: |
| 29 | + build: |
| 30 | + - |
| 31 | + name: Checkout |
| 32 | + uses: actions/checkout@v2 |
| 33 | + - |
| 34 | + name: Set up Docker Buildx |
| 35 | + uses: docker/setup-buildx-action@v1 |
| 36 | + - |
| 37 | + name: Login |
| 38 | + uses: docker/login-action@v1 |
| 39 | + with: |
| 40 | + registry: ${{ env.REGISTRY }} |
| 41 | + username: ${{ env.USER }} |
| 42 | + password: ${{ secrets.PASSWORD }} |
| 43 | + - |
| 44 | + name: Build and push |
| 45 | + uses: docker/build-push-action@v2 |
| 46 | + with: |
| 47 | + context: . |
| 48 | + tags: ${{ env.REGISTRY }}/myapp:latest |
| 49 | + push: true |
| 50 | +``` |
| 51 | +
|
| 52 | +### With `docker` driver |
| 53 | + |
| 54 | +```yaml |
| 55 | +jobs: |
| 56 | + build: |
| 57 | + - |
| 58 | + name: Checkout |
| 59 | + uses: actions/checkout@v2 |
| 60 | + - |
| 61 | + name: Login |
| 62 | + uses: docker/login-action@v1 |
| 63 | + with: |
| 64 | + registry: ${{ env.REGISTRY }} |
| 65 | + username: ${{ env.USER }} |
| 66 | + password: ${{ secrets.PASSWORD }} |
| 67 | + - |
| 68 | + name: Build |
| 69 | + uses: docker/build-push-action@v2 |
| 70 | + with: |
| 71 | + context: . |
| 72 | + tags: ${{ env.REGISTRY }}/myapp:latest |
| 73 | + load: true |
| 74 | + - |
| 75 | + name: Push |
| 76 | + run: docker push ${{ env.REGISTRY }}/myapp:latest |
| 77 | +``` |
| 78 | + |
| 79 | +### With `docker` driver and `setup-buildx` |
| 80 | + |
| 81 | +```yaml |
| 82 | +jobs: |
| 83 | + build: |
| 84 | + - |
| 85 | + name: Checkout |
| 86 | + uses: actions/checkout@v2 |
| 87 | + - |
| 88 | + name: Set up Docker Buildx |
| 89 | + uses: docker/setup-buildx-action@v1 |
| 90 | + with: |
| 91 | + driver: docker |
| 92 | + - |
| 93 | + name: Login |
| 94 | + uses: docker/login-action@v1 |
| 95 | + with: |
| 96 | + registry: ${{ env.REGISTRY }} |
| 97 | + username: ${{ env.USER }} |
| 98 | + password: ${{ secrets.PASSWORD }} |
| 99 | + - |
| 100 | + name: Build |
| 101 | + uses: docker/build-push-action@v2 |
| 102 | + with: |
| 103 | + context: . |
| 104 | + tags: ${{ env.REGISTRY }}/myapp:latest |
| 105 | + load: true |
| 106 | + - |
| 107 | + name: Push |
| 108 | + run: docker push ${{ env.REGISTRY }}/myapp:latest |
| 109 | +``` |
| 110 | + |
| 111 | +## Cannot push to a registry |
4 | 112 |
|
5 | 113 | While pushing to a registry, you may encounter these kinds of issues:
|
6 | 114 |
|
|
38 | 146 | containerd:
|
39 | 147 | runs-on: ubuntu-latest
|
40 | 148 | steps:
|
41 |
| - - |
| 149 | + - |
42 | 150 | name: Checkout
|
43 | 151 | uses: actions/checkout@v2
|
44 | 152 | -
|
|
0 commit comments