pxe-stack/git-alpine/Dockerfile
2023-07-21 11:53:52 +02:00

22 lines
No EOL
599 B
Docker

FROM alpine:3.18
LABEL org.opencontainers.image.authors="matthias+code@mailbro.de" \
description="git in alpine"
COPY entrypoint.sh /entrypoint.sh
# Install packages, chmod startup script and add a non-privileged user
RUN apk --no-cache add git openssh-client ; \
adduser -D -u 1000 non-privileged ; \
mkdir /git ; \
chown -R 1000:1000 /git ; \
chmod +x /entrypoint.sh ; \
chown -R 1000:1000 /entrypoint.sh
# Switch to the non-privileged user
USER 1000
VOLUME /git
WORKDIR /git
ENTRYPOINT ["/entrypoint.sh"]