Merge f58c294274 into 236ba5690e
This commit is contained in:
commit
fc4fc2e58d
|
|
@ -14,15 +14,15 @@
|
||||||
|
|
||||||
FROM docker.io/debian:bullseye-slim as base
|
FROM docker.io/debian:bullseye-slim as base
|
||||||
FROM base as build
|
FROM base as build
|
||||||
COPY ["top1", "/tmp/top1"]
|
|
||||||
RUN \
|
RUN \
|
||||||
set -eu; \
|
set -eu; \
|
||||||
cp /tmp/top1 /usr/local/bin/top1; \
|
touch /usr/local/bin/myfile; \
|
||||||
chown root:root /usr/local/bin/top1; \
|
chown root:root /usr/local/bin/myfile; \
|
||||||
chmod u=rxs,go=rx /usr/local/bin/top1; \
|
chmod u=rxs,go=rx /usr/local/bin/myfile; \
|
||||||
ls -lh /usr/local/bin/top1
|
ls -lh /usr/local/bin/myfile
|
||||||
FROM base as final
|
FROM base as final
|
||||||
COPY --from=build ["/usr/local/bin/top1", "/usr/local/bin/"]
|
COPY --from=build ["/usr/local/bin/myfile", "/usr/local/bin/"]
|
||||||
RUN [ -u /usr/local/bin/top1 ]
|
# Test if file exists and its set-user-id bit is set
|
||||||
|
RUN test -u /usr/local/bin/myfile
|
||||||
LABEL \
|
LABEL \
|
||||||
description="Testing setuid behavior in Kaniko"
|
description="Testing setuid behavior in Kaniko"
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Reference in New Issue