-
Notifications
You must be signed in to change notification settings - Fork 797
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
RUN command after VOLUME changes mountpoint owner #2202
Comments
carbonin
added a commit
to carbonin/manageiq
that referenced
this issue
Mar 3, 2020
This avoids the problems with the mount point caused by containers/buildah#2202 when using buildah
carbonin
added a commit
to carbonin/manageiq
that referenced
this issue
Mar 3, 2020
carbonin
added a commit
to carbonin/manageiq
that referenced
this issue
Mar 3, 2020
carbonin
added a commit
to carbonin/buildah
that referenced
this issue
Mar 10, 2020
Closes containers#2202 Signed-off-by: Nick Carboni <[email protected]>
@TomSweeneyRedHat I think I was able to fix this. I opened up #2216, can you take a look? I haven't worked out a test case yet as I assume installing additional packages isn't the best choice. |
bors bot
added a commit
that referenced
this issue
Mar 11, 2020
2216: Preserve volume uid and gid through subsequent commands r=TomSweeneyRedHat a=carbonin <!-- Thanks for sending a pull request! Please make sure you've read and understood our contributing guidelines (https://github.com/containers/buildah/blob/master/CONTRIBUTING.md) as well as ensuring that all your commits are signed with `git commit -s`. --> #### What type of PR is this? <!-- Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request. Uncomment only one `/kind <>` line, hit enter to put that in a new line, and remove leading whitespace from that line: --> /kind bug #### What this PR does / why we need it: This PR pulls the UID and GID fields from the stored file stat when reconstructing a volume after subsequent commands #### How to verify it Build the following Dockerfile: ```Dockerfile FROM centos:8 RUN dnf -y install --setopt=tsflags=nodocs postgresql-server VOLUME [ "/var/lib/pgsql/data" ] RUN touch /root/test ``` Observe the output of the following command: ```bash $ podman run --rm <image> ls -l /var/lib/pgsql total 0 drwx------. 1 postgres postgres 0 May 31 2019 backups drwx------. 1 postgres postgres 0 Mar 10 23:37 data ``` #### Which issue(s) this PR fixes: <!-- Automatically closes linked issue when PR is merged. Uncomment the following comment block and include the issue number or None on one line. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`, or `None`. --> Fixes #2202 #### Does this PR introduce a user-facing change? No <!-- If no, just write `None` in the release-note block below. If yes, a release note is required: Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required". For more information on release notes please follow the kubernetes model: https://git.k8s.io/community/contributors/guide/release-notes.md --> ```release-note None ``` Co-authored-by: Nick Carboni <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
Any
RUN
command following aVOLUME
command changes the volume user and group ownership.Steps to reproduce the issue:
buildah bud
Describe the results you received:
Image one:
Image two:
Describe the results you expected:
I expected the user and group of the
data
directory to not be changed by runningtouch /root/test
Output of
rpm -q buildah
orapt list buildah
:Output of
buildah version
:Output of
podman version
if reporting apodman build
issue:Output of
cat /etc/*release
:Output of
uname -a
:Output of
cat /etc/containers/storage.conf
:The text was updated successfully, but these errors were encountered: