-
Notifications
You must be signed in to change notification settings - Fork 785
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When the WORKDIR is a symlink and the target directory does not exist, RUN commands would fail. If the target doesn't exist, create the directory in the container. This also converts the code to use SecureJoin so that if a symlink is in the middle of a filepath, it will be converted correctly. Fixes: #1569 Tip of the hat to @karelyatin for the initial fix Signed-off-by: TomSweeneyRedHat <[email protected]> Closes: #1576 Approved by: rhatdan
- Loading branch information
1 parent
4c6b09c
commit c0633e3
Showing
10 changed files
with
346 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# No directory created for the target of the symlink | ||
FROM alpine | ||
RUN ln -sf /var/lib/tempest /tempest | ||
WORKDIR /tempest | ||
RUN touch /etc/notareal.conf | ||
RUN chmod 664 /etc/notareal.conf | ||
COPY Dockerfile-2 ./Dockerfile-2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# No directory created for the target of the symlink | ||
FROM alpine | ||
RUN ln -sf /var/lib/tempest /tempest | ||
WORKDIR /tempest/lowerdir | ||
RUN touch /etc/notareal.conf | ||
RUN chmod 664 /etc/notareal.conf | ||
RUN mkdir -p /tempest/lowerdir | ||
COPY Dockerfile-3 ./Dockerfile-3 | ||
COPY Dockerfile-3 /tempest/Dockerfile-3 | ||
COPY Dockerfile-3 /tempest/lowerdir/Dockerfile-3 |
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
28 changes: 28 additions & 0 deletions
28
vendor/github.com/cyphar/filepath-securejoin/LICENSE
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
65 changes: 65 additions & 0 deletions
65
vendor/github.com/cyphar/filepath-securejoin/README.md
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
135 changes: 135 additions & 0 deletions
135
vendor/github.com/cyphar/filepath-securejoin/join.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
vendor/github.com/cyphar/filepath-securejoin/vendor.conf
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.