GitHub Actions Docker build and push failed to copy: unexpected status: 413 Request Entity Too Large

Viewed 526

I have been trying to build and push my Docker images through GitHub Actions and push them to my Docker Registry.

For this I have been using the following workflow file:

name: Docker publish

on:
  push:
    branches: [ develop ]

  workflow_dispatch:

jobs:

  build:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Set up QEMU
        uses: docker/setup-qemu-action@v1

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1

      - name: Login to registry
        uses: docker/login-action@v1
        with:
          registry: https://registry.domain.com
          username: ${{ secrets.REGISTRY_USERNAME }}
          password: ${{ secrets.REGISTRY_PASSWORD }}

      - name: Build and push web
        id: docker_build_web
        uses: docker/build-push-action@v2
        with:
          push: true
          context: ./web
          tags: registry.domain.com/web:latest

      - name: Build and push api
        id: docker_build_api
        uses: docker/build-push-action@v2
        with:
          push: true
          context: ./api
          tags: registry.domain.com/api:latest

It all works well until it starts building the first image of the web project, which is an Angular project. After some time building the web image, it gives the error:

Error: buildx call failed with: error: failed to solve: rpc error: code = Unknown desc = failed to copy: unexpected status: 413 Request Entity Too Large

I have looked for quite a while now, but can not seem to find a fix for the problem or even the reason why this issue is happening. My only guess at the moment is that my images are too large.

0 Answers
Related