-
Notifications
You must be signed in to change notification settings - Fork 788
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
run: use internal.GetTempDir with os.MkdirTemp
Projects which are using buildah as a library and set `TMPDIR` manually can stumble upon a use-case where `TMPDIR` was set to a relative path. Such as `export TMPDIR=.` in such case buildah will try to create a temporary root using `Mkdirtemp` leading to a point where bundle is not generated correctly since path was relative. Following use case can be resolved by making sure that buildah always converts relative path to absolute path and `GetTempDir` does it well. Example reproducer with podman ```Dockerfile FROM alpine RUN echo hello ``` ```console export TMPDIR=. podman build --no-cache -t test . ``` Expected failure ```console STEP 1/2: FROM alpine STEP 2/2: RUN echo hello error running container: checking permissions on "buildah2341274198": stat buildah2341274198: no such file or directory ERRO[0000] did not get container create message from subprocess: EOF Error: building at STEP "RUN echo hello": while running runtime: exit status 1 ``` Closes: RHEL-2598 Signed-off-by: Aditya R <[email protected]>
- Loading branch information
Showing
3 changed files
with
15 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters