Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] Packages podman & podman-docker emulating Docker for Marketplace GitHub Actions Possible? #18

Open
CalvinLac opened this issue Feb 17, 2022 · 1 comment

Comments

@CalvinLac
Copy link

Question: Packages podman & podman-docker emulating Docker for Marketplace GitHub Actions Possible?

In testing of the Buildah/Podman image supplied in this repository, the podman-docker package was added to enable Marketplace GitHub Actions that require Docker to run using Podman instead. The self-hosted runner is deployed as an OpenShift Pod. This solution references the documentation in this article: Podman commands are the same as Docker’s

Podman commands are the same as Docker’s
When building Podman, the goal was to make sure that Docker users could easily adapt. So all the commands you are familiar with also exist with Podman. In fact, the claim is made that if you have existing scripts that run Docker you can create a docker alias for podman and all your scripts should work (alias docker=podman). Try it. Of course, you should stop Docker first (systemctl stop docker). There is a package you can install called podman-docker that does this for conversion for you. It drops a script at /usr/bin/docker that executes Podman with the same arguments.

When trying to run the action "sonarsource/sonarqube-scan-action@master", the workflow errors out on a /usr/bin/docker run -v "/home/runner/_work/_temp/_github_home":"/github/home" command:

/usr/bin/docker run --name b1cbc5a56304d7281e40fbba339c7df5ec7778_c9ac80 --label b1cbc5 --workdir /github/workspace --rm -e BRANCH_NAME -e SONAR_TOKEN -e SONAR_HOST_URL -e INPUT_ARGS -e INPUT_PROJECTBASEDIR -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/_work/_temp/_github_home":"/github/home" -v "/home/runner/_work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/_work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/_work/devops-apiserver/devops-apiserver":"/github/workspace" b1cbc5:a56304d7281e40fbba339c7df5ec7778

Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
cannot resolve /github/home: lstat /github: no such file or directory

The OpenShift pod is deployed using a ServiceAccount created with the anyuid SCC.

@erikhjensen
Copy link

Question for the GitHub Actions team. there are many docker actions. Is there a known pattern for running these on a containerized runner or, would this be considered a not supported scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants