Dockerfiles to build OCI images shipped with Podman container runtine in rootless mode.
I've been using these images to test how Podman behaves when running inside containers. To be more specific, I'm trying to use them to build images inside containers as an alternative to Docker in Docker (DinD).
Instructions and results are presented below.
cd <BASE-LINUX-FLAVOR> # e.g. fedora
docker build --rm -t rootless-podman .
docker run -it --rm rootless-podman /bin/bash
docker run -it --privileged --rm rootless-podman /bin/bash
- Docker-managed containers: privileged mode is required to build images inside a given container and works as expected.
cd <BASE-LINUX-FLAVOR> # e.g. fedora
podman build --rm -t rootless-podman .
podman run -it --rm rootless-podman /bin/bash
podman run -it --privileged --rm rootless-podman /bin/bash
-
Podman-managed containers: privileged mode is required to build images inside a given container, but I receive the following error message when trying to do that:
Error: error creating build container: The following failures happened while trying to pull image specified by <IMAGE-NAME> based on search registries in /etc/containers/registries.conf: * "localhost/<IMAGE-NAME>": Error initializing source docker://localhost/<IMAGE-NAME>: error pinging docker registry localhost: Get https://localhost/v2/: dial tcp 127.0.0.1:443: connect: connection refused * "docker.io/library/<IMAGE-NAME>": Error committing the finished image: error adding layer with blob "sha256:997...": Error processing tar file (exit status 1): there might not be enough IDs available in the namespace (requested 0:42 for /etc/gshadow): lchown /etc/gshadow: invalid argument * "quay.io/<IMAGE-NAME>": Error initializing source docker://quay.io/<IMAGE-NAME>: Error reading manifest <IMAGE-VERSION> in quay.io/<IMAGE-BASE_NAME>: error parsing HTTP 404 response body: invalid character '<' looking for beginning of value: "<...404 Not Found..."
Please make sure to take a moment and read the Code of Conduct.
Please report bugs and suggest features via the GitHub Issues.
Before opening an issue, search the tracker for possible duplicates. If you find a duplicate, please add a comment saying that you encountered the problem as well.
Please make sure to read the Contributing Guide before making a pull request.