mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-11-30 08:00:19 +01:00
Add /tmp dir to Docker image (#506)
fixes #462 Co-authored-by: Andrés Maldonado <maldonado@codelutin.com>
This commit is contained in:
parent
3588502c50
commit
31520b1afd
1 changed files with 2 additions and 1 deletions
|
@ -18,7 +18,7 @@ ARG PUID=5000 \
|
||||||
PGID=5000 \
|
PGID=5000 \
|
||||||
RUNAS
|
RUNAS
|
||||||
|
|
||||||
RUN mkdir -p /tmp/useradd && \
|
RUN mkdir -p /tmp/useradd /tmp/empty && \
|
||||||
if [ ! -z "$RUNAS" ]; then \
|
if [ ! -z "$RUNAS" ]; then \
|
||||||
echo "${RUNAS}:x:${PUID}:${PGID}::/nonexistent:/sbin/nologin" >> /tmp/useradd/passwd && \
|
echo "${RUNAS}:x:${PUID}:${PGID}::/nonexistent:/sbin/nologin" >> /tmp/useradd/passwd && \
|
||||||
echo "${RUNAS}:!:::::::" >> /tmp/useradd/shadow && \
|
echo "${RUNAS}:!:::::::" >> /tmp/useradd/shadow && \
|
||||||
|
@ -29,6 +29,7 @@ FROM scratch AS final
|
||||||
LABEL maintainer="Andrea Spacca <andrea.spacca@gmail.com>"
|
LABEL maintainer="Andrea Spacca <andrea.spacca@gmail.com>"
|
||||||
ARG RUNAS
|
ARG RUNAS
|
||||||
|
|
||||||
|
COPY --from=build /tmp/empty /tmp
|
||||||
COPY --from=build /tmp/useradd/* /etc/
|
COPY --from=build /tmp/useradd/* /etc/
|
||||||
COPY --from=build --chown=${RUNAS} /go/bin/transfersh /go/bin/transfersh
|
COPY --from=build --chown=${RUNAS} /go/bin/transfersh /go/bin/transfersh
|
||||||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||||
|
|
Loading…
Reference in a new issue