change to rootful container

This commit is contained in:
Emil Lerch 2023-03-27 22:14:05 -07:00
parent eed1526297
commit d5a548bb06
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -1,7 +1,10 @@
FROM docker:20.10.23-dind-rootless FROM docker:20.10.23-dind
# Cannot use a rootless container due to permissions errors writing to the
# workspace
# This is an alpine-based image # This is an alpine-based image
USER root
RUN true && \ RUN true && \
apk add --no-cache curl && \ apk add --no-cache curl && \
apkArch="$(arch)" && \ apkArch="$(arch)" && \
@ -9,11 +12,8 @@ RUN true && \
curl -sLO https://github.com/sigstore/rekor/releases/download/v1.0.1/rekor-cli-linux-${apkArch} && \ curl -sLO https://github.com/sigstore/rekor/releases/download/v1.0.1/rekor-cli-linux-${apkArch} && \
mv rekor-cli-linux-${apkArch} /usr/bin/rekor && \ mv rekor-cli-linux-${apkArch} /usr/bin/rekor && \
chmod 755 /usr/bin/rekor && \ chmod 755 /usr/bin/rekor && \
addgroup -g 998 docker && \
addgroup rootless docker && \
true true
COPY entrypoint.sh / COPY entrypoint.sh /
USER rootless
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]