-
Notifications
You must be signed in to change notification settings - Fork 171
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
oscontainer: Use skopeo, not podman to extract #1671
oscontainer: Use skopeo, not podman to extract #1671
Conversation
src/oscontainer.py
Outdated
subprocess.check_call(['find', '-name', '*.tar', '-exec', 'tar', 'xUf', '{}', ';'], cwd=tmpdir) | ||
subprocess.check_call(['find', '!', '-perm', '-u+w', '-exec', 'chmod', 'u+w', '{}', ';'], cwd=tmpdir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I think I follow, though some comments for these two would be helpful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm actually surprised there isn't a command to just extract all the layers for you into a custom directory. That would also ensure it unpacks the layers in the right order. Might be a good RFE for skopeo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or probably podman image extract
- it seems like oc
isn't using containers/storage
(which is the source of the problems here when run nested). Probably this code could get lowered into podman and then oc
could vendor it or so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some comments.
Using I'd proffer a lgtm, but its Friday. @cgwalters merge when ready. |
/approve |
I kept running into failures trying to run this in an unprivileged container; basically the containers stack seems to want to try to `chown()` files based on the UIDs, but we don't care about that at all for this. What we really want is the functionality of `oc image extract` but that doesn't exist yet in the podman stack and today cosa doesn't include `oc` (that's a big discussion).
bd49446
to
da57979
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters, darkmuggle, jlebon 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 |
I kept running into failures trying to run this in an
unprivileged container; basically the containers stack
seems to want to try to
chown()
files based on the UIDs,but we don't care about that at all for this.
What we really want is the functionality of
oc image extract
but that doesn't exist yet in the podman stack and today
cosa doesn't include
oc
(that's a big discussion).