FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Unable run Docker lang with Podman on Mac · Issue #2509 · pre-commit/pre-commit · GitHub

Repository navigation

Unable run Docker lang with Podman on Mac #2509

Closed

Description

search tried in the issue tracker

podman

describe your issue

I receive the following error when I use pre-commit with a docker language hook:

❯ pre-commit run --verbose --all-files
Lint GitHub Actions workflow file Docker.................................Failed
- hook id: actionlint-docker
- duration: 0.18s
- exit code: 1

unable to upgrade to tcp, received 409

I am able to reproduce the error with the equivalent Docker CLI command, based on https://github.com/pre-commit/pre-commit/blob/v2.20.0/pre_commit/languages/docker.py#L116-L126:

❯ docker container run --rm --volume "$(pwd):/src:rw,Z" --workdir /src -u "$(id -u):$(id -g)" docker.io/rhysd/actionlint:1.6.17 -- .github/workflows/ci.yaml
unable to upgrade to tcp, received 409

When I remove the flag for selinux labeling, I no longer receive the error:

❯ docker container run --rm --volume "$(pwd):/src:rw" --workdir /src -u "$(id -u):$(id -g)" docker.io/rhysd/actionlint:1.6.17 -- .github/workflows/ci.yaml

❯ echo $?
0

I tried this as a rootless and non-rootless daemon with the same results (which leads me to believe #1243 is long longer an issue).

This lead me to podman-container-tools/podman#13727 (comment)

Yes, the :Z and :z will not work on networked mounted volumes, which are used on a MAC. We are working on virtiofsd support for SELinux which could also work on a MAC, but this does not exists yet.

Would pre-commit/asottile be open and have ideas to a workaround?
If not, at least this can serve as information for anyone else who is trying to use podman machine.

pre-commit --version

pre-commit 2.20.0

.pre-commit-config.yaml

repos:
  - repo: https://github.com/rhysd/actionlint
    rev: v1.6.17
    hooks:
      - id: actionlint-docker

~/.cache/pre-commit/pre-commit.log (if present)

No response

Activity

  1. asottile commented on Sep 9, 2022

    Member

    yeah probably best to wait for upstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL