28 lines
739 B
Docker
28 lines
739 B
Docker
FROM docker.io/library/alpine:3
|
|
|
|
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 --no-cache update
|
|
|
|
RUN apk -U --no-cache add \
|
|
doas doas-sudo-shim \
|
|
bash less openvi \
|
|
coreutils grep gawk perl \
|
|
curl
|
|
|
|
RUN adduser -h /home/cli -s /bin/bash -D cli cli && \
|
|
addgroup cli wheel && \
|
|
echo "permit nopass :wheel" > /etc/doas.d/allow-wheel.conf
|
|
|
|
ADD --chown=cli:cli home /home/cli
|
|
|
|
WORKDIR /home/cli
|
|
|
|
USER cli
|
|
|
|
CMD ["/bin/bash", "-l"]
|