Search code examples
dockergithub-actions

GitHub Actions Docker Service Container >25GB Cannot Be Loaded


I am attempting to use the minus34/gnafloader Docker container in a GitHub Actions workflow. The container is 21-25 Gb when uncompressed which causes the workflow to run out of storage and crash.

name: Address Testing
on: workflow_call
jobs:
  test:
    runs-on: ubuntu-latest
    services: 
      db: 
        image: minus34/gnafloader:latest

I then looked into deleting some of the pre-installed software so that there would be enough storage space using easimon/maximize-build-space. The problem I encountered with this approach was that the services are always started first so the files aren't deleted until after the container is pulled.

name: Address Testing
on: workflow_dispatch
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: Maximize build space
        uses: easimon/maximize-build-space@master
        with:
          root-reserve-mb: 512
          swap-size-mb: 1024
          remove-dotnet: 'true'
          remove-android: 'true'
      - uses: docker://minus34/gnafloader:latest

So I was wondering if there were any workarounds to pull the docker container after the additional storage space has been made available?


Solution

  • The solution of running the docker container using docker run as suggested by @Azeem after additional space has been cleared using easimon/maximize-build-space.

    One thing to note with easimon/maximize-build-space is that by default the location of docker containers is reduced to 0 and needs to be manually set using root-reserve-mb.

    name: Address Testing
    on: workflow_dispatch
    jobs:
      test:
        runs-on: ubuntu-latest
        steps:
          - name: Maximize build space
            uses: easimon/maximize-build-space@master
            with:
              root-reserve-mb: 35000
              swap-size-mb: 1024
              remove-dotnet: 'true'
              remove-android: 'true'
          - name: Docker
            run: |
              docker pull minus34/gnafloader:latest
              docker run -d --publish=5433:5432 minus34/gnafloader:latest