Description
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.