docker-practice / actions-setup-docker

Set up your GitHub Actions workflow with a specific version(18.09,19.03,20.10,nightly) of Docker ON Linux/macOS
91 stars 34 forks source link

cat: /etc/docker/daemon.json: No such file or directory #40

Open hansehe opened 2 weeks ago

hansehe commented 2 weeks ago

Hi, and first of all, a great package!

But just yesterday, I continuously get this error in the github actions pipeline:

Run docker-practice/actions-setup-docker@master
check docker systemd status
check docker version
add apt source
update apt cache
show available docker version
remove default moby
install docker
check docker version
check docker systemd status
show default daemon json content
  /usr/bin/sudo cat /etc/docker/daemon.json
  cat: /etc/docker/daemon.json: No such file or directory
  Error: Error: The process '/usr/bin/sudo' failed with exit code 1

The job runs on ubuntu-latest, with this setup:

name: CD

on: 
  workflow_dispatch: {}
  push:
    tags: [ 'v*' ]

env:
  DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
  DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        docker_channel:
          - stable

    steps:
      - uses: actions/checkout@v2
      - name: Set up Python
        uses: actions/setup-python@v2
      - name: setup Docker
        uses: docker-practice/actions-setup-docker@master
        with:
          docker_channel: ${{ matrix.docker_channel }}
      - name: login to docker hub
        uses: docker/login-action@v1
        with:
          registry: docker.io
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_PASSWORD }}

      - name: Install requirements
        run: |
          pip install DockerBuildManagement

      - name: Publish
        run: |
          dbm -build -publish prod

I think it's a problem with some runners hosted by github, but is there something we can do to handle this?

Best regards. Hans Erik Heggem

hansehe commented 2 weeks ago

After some experimenting, I tried to downgrade to using ubuntu-22.04 (from ubuntu-latest, which is ubuntu-24.04), and then it all works. So I've posted an issue here: