docker / setup-buildx-action

GitHub Action to set up Docker Buildx
https://github.com/marketplace/actions/docker-setup-buildx
Apache License 2.0
906 stars 142 forks source link

Error ENOENT: no such file or directory, mkdir '/home/runner/.docker/cli-plugins' when running in a self hosted runner #265

Closed V1ct0rHM closed 8 months ago

V1ct0rHM commented 10 months ago

Behaviour

Steps to reproduce this issue

  1. Configure the job to use self-hosted runner
  2. Run the workflow

Expected behaviour

Should run without problem, maybe first checking if the folder exist

Actual behaviour

Its returning error: ENOENT: no such file or directory, mkdir '/home/runner/.docker/cli-plugins'

Configuration

  build:
    name: Build and Deploy
    runs-on: self-hosted
    needs: [check_pr_name_prefix, create_hosted_zone, lint_and_test]
    environment: ticket-based
    env:
      AWS_DEFAULT_REGION: us-east-1
      BRANCH: ${{ needs.check_pr_name_prefix.outputs.pr-prefix }}
      TICKET: ${{ needs.check_pr_name_prefix.outputs.pr-prefix-lower }}
      TICKET_FRONT: ${{ needs.check_pr_name_prefix.outputs.commit-frontend }}

    steps:
      - uses: actions/checkout@v3
      - name: Set up Go 1.x
        uses: actions/setup-go@v3
        with:
          go-version: ^1.19

      - name: Set AWS credentials
        uses: aws-actions/configure-aws-credentials@v2
        with:
          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          aws-region: us-east-1
          role-to-assume: arn:aws:iam::XXX:role/GithubActionsRole
          role-skip-session-tagging: true
          role-duration-seconds: 3600

      - name: Set branch and commit outputs
        id: image_id
        shell: bash
        run: |
          echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
          echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
          echo "IMAGE_TAG=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

      - name: Compile code
        run: make build

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

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

Logs

Run docker/setup-buildx-action@v1 with: driver: docker-container buildkitd-flags: --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host install: false use: true env: AWS_DEFAULT_REGION: us-east-1 BRANCH: ENG-4948-be TICKET: eng-4948-be TICKET_FRONT: eng-4948-be-only AWS_REGION: us-east-1 AWS_ACCESS_KEY_ID: AWS_SECRET_ACCESS_KEY: AWS_SESSION_TOKEN: *** Warning: The save-state command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/[2](https://github.com/c4ad/portal-backend/actions/runs/6112926511/job/16591439919#step:10:2)022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ Warning: The save-state command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ Docker info Download and install buildx Downloading https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd6[4](https://github.com/c4ad/portal-backend/actions/runs/6112926511/job/16591439919#step:10:4) Docker plugin mode Error: ENOENT: no such file or directory, mkdir '/home/runner/.docker/cli-plugins'> and attach it to this issue.

crazy-max commented 8 months ago

Run docker/setup-buildx-action@v1

Actions seems outdated looking at your logs. Can you update to latest docker/setup-buildx-action@v3?

Closing in the meantime but let us know if you still have an issue.