31 lines
1.2 KiB
Docker
31 lines
1.2 KiB
Docker
FROM debian:trixie-slim
|
|
|
|
ENV LANG=C.UTF-8
|
|
|
|
# Slim images exclude man pages through a dpkg path filter. Removing it and
|
|
# reinstalling the preinstalled essentials restores their man pages.
|
|
RUN rm -f /etc/dpkg/dpkg.cfg.d/docker \
|
|
&& apt-get update \
|
|
&& apt-get install -y --no-install-recommends --reinstall \
|
|
bash coreutils findutils grep sed \
|
|
&& apt-get install -y --no-install-recommends \
|
|
gawk less tree file vim-tiny nano man-db manpages jq procps htop \
|
|
figlet cowsay fortune-mod fortunes-min sl curl wget \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# The home directory stays empty, because Podman copies image content into
|
|
# tmpfs mounts and Docker does not. All shell configuration lives in /etc.
|
|
# Setuid binaries are useless under no-new-privileges, so they are stripped
|
|
# to keep the attack surface minimal even if that option is ever dropped.
|
|
RUN useradd --uid 1000 --no-create-home --home-dir /home/guest --shell /bin/bash guest \
|
|
&& mkdir /home/guest \
|
|
&& find / -xdev -perm /6000 -type f -exec chmod a-s {} +
|
|
|
|
COPY etc/ /etc/
|
|
COPY --chmod=0755 bin/status /usr/local/bin/status
|
|
|
|
ENV PATH=/usr/local/bin:/usr/bin:/bin:/usr/games
|
|
USER guest
|
|
WORKDIR /home/guest
|
|
CMD ["/bin/bash", "-l"]
|