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

[CI:DOCS] Update podman image Dockerfile to support Podman in container #9956

Merged
merged 1 commit into from
Apr 12, 2021

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Apr 6, 2021

[NO TEST NEEDED] Can not test this in CI/CD system since it needs to be
merged in order for the Dockerfiles to even work.

Modified the /etc/subuid and /etc/subgid to be able to run in rootless
containers. The Range can not be the same as on the host.

Add /home/podman/.config/containers/containers.conf to automatically
mount /proc on /proc while inside of the container. This prevents
additional permissions being required that are blocked when not in
--privileged mode.

Setup volumes for /var/lib/containers and
/home/podman/.local/share/containwers

This will prevent the errors where people are doing overlay on overlay.

Signed-off-by: Daniel J Walsh [email protected]

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 6, 2021
@rhatdan
Copy link
Member Author

rhatdan commented Apr 6, 2021

@TomSweeneyRedHat @mheon @vrothberg PTAL

@mheon
Copy link
Member

mheon commented Apr 6, 2021

LGTM for me. Compose test is failing elsewhere, likely unrelated.

@rhatdan rhatdan changed the title Update podman image Dockerfile to support Podman in container [CI:Docs] Update podman image Dockerfile to support Podman in container Apr 8, 2021
@rhatdan rhatdan changed the title [CI:Docs] Update podman image Dockerfile to support Podman in container [CI:DOC] Update podman image Dockerfile to support Podman in container Apr 8, 2021
@rhatdan
Copy link
Member Author

rhatdan commented Apr 8, 2021

@giuseppe @umohnani8 PTAL

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just an inline question, but:

LGTM

Comment on lines +19 to +21
echo podman:10000:5000 > /etc/subuid; \
echo podman:10000:5000 > /etc/subgid;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just something to think about, not blocking for this PR but that we probably want to address in future.

With such ranges specified:

  • If the outer Podman doesn't run in a user namespace, all the inner Podman will end up using the same IDs.
  • If the outer Podman runs in a user namespace, there won't likely be enough IDs to satisfy this request.

If we want to address the first scenario, we could probably fix it at runtime, and have the entrypoint script generate these entries with a random initial ID.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I think in the long run we want to make this more flexible, some how, But for now, we want to get to the point that we have an image which people can experiment with.

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe, rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@umohnani8
Copy link
Member

LGTM

@rhatdan rhatdan changed the title [CI:DOC] Update podman image Dockerfile to support Podman in container [CI:DOCS] Update podman image Dockerfile to support Podman in container Apr 12, 2021
[NO TEST NEEDED] Can not test this in CI/CD system since it needs to be
merged in order for the Dockerfiles to even work.

Modified the /etc/subuid and /etc/subgid to be able to run in rootless
containers.  The Range can not be the same as on the host.

Add /home/podman/.config/containers/containers.conf to automatically
mount /proc on /proc while inside of the container. This prevents
additional permissions being required that are blocked when not in
--privileged mode.

Setup volumes for /var/lib/containers and
/home/podman/.local/share/containwers

This will prevent the errors where people are doing overlay on overlay.

Signed-off-by: Daniel J Walsh <[email protected]>
@rhatdan rhatdan added the lgtm Indicates that a PR is ready to be merged. label Apr 12, 2021
@openshift-merge-robot openshift-merge-robot merged commit 3803a26 into containers:master Apr 12, 2021
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants