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

move mounted code to fix /tmp file permissions #6354

Merged
merged 3 commits into from
Sep 4, 2024
Merged

move mounted code to fix /tmp file permissions #6354

merged 3 commits into from
Sep 4, 2024

Conversation

pdabelf5
Copy link
Collaborator

@pdabelf5 pdabelf5 commented Sep 4, 2024

Proposed changes

The OS patching on base image generation was silently failing due to a permissions errors on the /tmp file system

#124 [linux/arm64 common 1/1] RUN --mount=type=bind,target=/tmp 	--mount=type=bind,from=nginx-files,src=common.sh,target=/usr/local/bin/common.sh 	--mount=type=bind,from=nginx-files,src=patch-os.sh,target=/usr/local/bin/patch-os.sh 	patch-os.sh 	&& common.sh
#124 0.156 Patching Debian
#124 0.754 Hit:1 http://deb.debian.org/debian bookworm InRelease
#124 0.760 Hit:2 http://deb.debian.org/debian bookworm-updates InRelease
#124 0.760 Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease
#124 0.811 Err:1 http://deb.debian.org/debian bookworm InRelease
#124 0.812   Couldn't create temporary file /tmp/apt.conf.bvGASO for passing config to apt-key
#124 0.825 Err:2 http://deb.debian.org/debian bookworm-updates InRelease
#124 0.825   Couldn't create temporary file /tmp/apt.conf.KePWjI for passing config to apt-key
#124 0.837 Err:3 http://deb.debian.org/debian-security bookworm-security InRelease
#124 0.837   Couldn't create temporary file /tmp/apt.conf.uTj0mw for passing config to apt-key
#124 0.925 Reading package lists...
#124 1.158 W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://deb.debian.org/debian bookworm InRelease: Couldn't create temporary file /tmp/apt.conf.bvGASO for passing config to apt-key
#124 1.158 W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://deb.debian.org/debian bookworm-updates InRelease: Couldn't create temporary file /tmp/apt.conf.KePWjI for passing config to apt-key
#124 1.158 W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://deb.debian.org/debian-security bookworm-security InRelease: Couldn't create temporary file /tmp/apt.conf.uTj0mw for passing config to apt-key
#124 1.158 W: Failed to fetch http://deb.debian.org/debian/dists/bookworm/InRelease  Couldn't create temporary file /tmp/apt.conf.bvGASO for passing config to apt-key
#124 1.159 W: Failed to fetch http://deb.debian.org/debian/dists/bookworm-updates/InRelease  Couldn't create temporary file /tmp/apt.conf.KePWjI for passing config to apt-key
#124 1.159 W: Failed to fetch http://deb.debian.org/debian-security/dists/bookworm-security/InRelease  Couldn't create temporary file /tmp/apt.conf.uTj0mw for passing config to apt-key
#124 1.159 W: Some index files failed to download. They have been ignored, or old ones used instead.
#124 1.159 E: Unable to mkstemp /tmp/clearsigned.message.Um1gn0 - GetTempFile (30: Read-only file system)
#124 1.159 E: The package lists or status file could not be parsed or opened.
#124 1.344 Reading package lists...
#124 1.526 E: Unable to mkstemp /tmp/clearsigned.message.z3xLHq - GetTempFile (30: Read-only file system)
#124 1.526 E: The package lists or status file could not be parsed or opened.

This change moves where the code is mounted to within the build stage rather than /tmp it now uses /code. This means that the /tmp filesystem has the correct permissions.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@pdabelf5 pdabelf5 requested a review from a team as a code owner September 4, 2024 15:45
@github-actions github-actions bot added the docker Pull requests that update Docker code label Sep 4, 2024
@pdabelf5 pdabelf5 added the needs cherry pick Cherry pick this PR into a release branch label Sep 4, 2024
@pdabelf5 pdabelf5 self-assigned this Sep 4, 2024
@pdabelf5 pdabelf5 enabled auto-merge (squash) September 4, 2024 16:10
@pdabelf5 pdabelf5 merged commit 90a52a0 into main Sep 4, 2024
77 checks passed
@pdabelf5 pdabelf5 deleted the patching-fix branch September 4, 2024 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker Pull requests that update Docker code needs cherry pick Cherry pick this PR into a release branch
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants