A debian 12 slim docker image
2.1K
FROM debian:bookworm-slim
USER root
ARG USER=debian
ARG PASSWD=debian
RUN apt-get update && \
apt-get install -y locales sudo perl wget curl vim procps && \
rm -rf /var/lib/apt/lists/* && \
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \
useradd -d /home/$USER -m -s /bin/bash -r -U $USER && \
echo "$USER:$PASSWD" | chpasswd && \
echo "$USER ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/$USER && \
echo '\
if [ "$BASH" ]; then\n\
if [ -f ~/.bashrc ]; then\n\
. ~/.bashrc\n\
fi\n\
fi\n\
\n\
mesg n 2> /dev/null || true\
'> /home/$USER/.profile && \
echo '\
export LS_OPTIONS="--color=auto"\n\
alias ls="ls $LS_OPTIONS"\n\
alias ll="ls $LS_OPTIONS -lh"\n\
'> /home/$USER/.bashrc && \
cp /home/$USER/.profile /root/.profile && \
cp /home/$USER/.bashrc /root/.bashrc
ENV LANG en_US.utf8
USER $USER
WORKDIR /home/$USER
ENTRYPOINT [""]
docker run \
-it \
--net=host \
--name debian12-test \
--user debian \
ireina/debian-bookworm-slim:latest \
/bin/bash -l
Feel free to use sudo without password.
Content type
Image
Digest
sha256:76df29260…
Size
113.2 MB
Last updated
about 1 year ago
docker pull ireina/debian-bookworm-slim