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

Ensure deploy is owned by user #680

Merged

Conversation

stefanb2
Copy link
Contributor

Files copied out by sudo docker cp ... are owned by root and not the calling user.

Update the build-docker.sh to use tar streaming mode instead. As the receiving tar command is executed outside Docker the resulting directories & files are owned by the calling user. Hence you no longer need to use sudo rm -rf deploy to remove it.

@stefanb2 stefanb2 force-pushed the topic-ensure-deploy-is-owned-by-user branch from 789e91a to 3a55312 Compare March 24, 2023 10:06
Switch "docker cp" to tar streaming mode. As the receiving "tar" command
is executed outside Docker the resulting directories & files are owned
by the calling user.
@stefanb2 stefanb2 force-pushed the topic-ensure-deploy-is-owned-by-user branch from 3a55312 to 948a285 Compare March 24, 2023 10:08
@XECDesign
Copy link
Member

Seems okay. Shall I merge or are you still making changes?

@stefanb2
Copy link
Contributor Author

Seems okay. Shall I merge or are you still making changes?

Please go ahead and merge. Thank you.

@XECDesign
Copy link
Member

Github says no. Another day.

@XECDesign XECDesign merged commit 0db41e3 into RPi-Distro:master Mar 27, 2023
@stefanb2 stefanb2 deleted the topic-ensure-deploy-is-owned-by-user branch March 27, 2023 14:24
martignoni added a commit to moodlebox/pi-gen-moodlebox that referenced this pull request Mar 31, 2023
* Fix apt gpg key install
* export-image: change boot partition lable to 'bootfs'

Fixes RPi-Distro#669

* Update release notes
* Check that docker is not set up in rootless mode (RPi-Distro#679)

Mounting binfmt_misc inside the container requires root rights. If
"docker info" indicates rootless mode then fall back to "sudo docker".

Allow the user to override the docker command with the DOCKER by setting
the environment variable.

* Ensure that deploy is always owned by user (RPi-Distro#680)

Switch "docker cp" to tar streaming mode. As the receiving "tar" command
is executed outside Docker the resulting directories & files are owned
by the calling user.

* DRY removal for docker run command line (RPi-Distro#686)

Factor out the differences into variables so that there is only one
implementation of the "docker run" command line to maintain.

* Use tmpfs for chroot /run and /tmp

---------

Co-authored-by: Serge Schneider <[email protected]>
Co-authored-by: Stefan Becker <[email protected]>
SRaus pushed a commit to analogdevicesinc/adi-kuiper-gen that referenced this pull request Jun 6, 2023
Switch "docker cp" to tar streaming mode. As the receiving "tar" command
is executed outside Docker the resulting directories & files are owned
by the calling user.
wandering-andy pushed a commit to wandering-andy/pi-gen that referenced this pull request Oct 15, 2023
Switch "docker cp" to tar streaming mode. As the receiving "tar" command
is executed outside Docker the resulting directories & files are owned
by the calling user.
kayhannay pushed a commit to kayhannay/efalive_pi that referenced this pull request Feb 12, 2024
Switch "docker cp" to tar streaming mode. As the receiving "tar" command
is executed outside Docker the resulting directories & files are owned
by the calling user.
UmeshMohan-Dozee pushed a commit to DozeeRnD/pi-gen that referenced this pull request Sep 18, 2024
Switch "docker cp" to tar streaming mode. As the receiving "tar" command
is executed outside Docker the resulting directories & files are owned
by the calling user.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants