alpine-cli/Dockerfile
2023-05-08 22:15:53 -04:00

27 lines
717 B
Docker

FROM docker.io/library/alpine:latest
LABEL org.opencontainers.image.title=jswank/alpine-cli \
org.opencontainers.image.description="A minimal image for running Linux CLI utilities" \
org.opencontainers.image.url=https://git.sr.ht/~jswank/alpine-cli \
org.opencontainers.image.authors="Jason Swank" \
org.opencontainers.image.licenses=MIT
RUN apk -U --no-cache add \
doas doas-sudo-shim \
bash less \
coreutils grep gawk perl
RUN adduser -h /home/cli -s /bin/bash -D cli cli && \
addgroup cli wheel && \
echo "permit nopass :wheel" > /etc/doas.d/allow-wheel.conf
COPY home /home/cli
RUN chown -R cli:cli /home/cli
WORKDIR /home/cli
USER cli
CMD ["/bin/bash", "-l"]