-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix uid, gid overriding * fix ownership for staging building * add integration test * add check for ignored files * improve errors
- Loading branch information
Showing
2 changed files
with
79 additions
and
2 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
integration/dockerfiles-with-context/issue-1315/Dockerfile
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,20 @@ | ||
FROM alpine:3.11 as builder | ||
|
||
RUN mkdir -p /myapp/somedir \ | ||
&& touch /myapp/somedir/somefile \ | ||
&& chown 123:123 /myapp/somedir \ | ||
&& chown 321:321 /myapp/somedir/somefile | ||
|
||
FROM alpine:3.11 | ||
COPY --from=builder /myapp /myapp | ||
RUN printf "%s\n" \ | ||
"0 0 /myapp/" \ | ||
"123 123 /myapp/somedir" \ | ||
"321 321 /myapp/somedir/somefile" \ | ||
> /tmp/expected \ | ||
&& stat -c "%u %g %n" \ | ||
/myapp/ \ | ||
/myapp/somedir \ | ||
/myapp/somedir/somefile \ | ||
> /tmp/got \ | ||
&& diff -u /tmp/got /tmp/expected |
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