Sign inSign up

ireina/debian-bookworm-slim

By ireina

•Updated about 1 year ago

A debian 12 slim docker image

Image
0

2.1K

ireina/debian-bookworm-slim repository overview

  1. Dockerfile
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 [""]
  1. How to run
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.

Tag summary

Content type

Image

Digest

sha256:76df29260…

Size

113.2 MB

Last updated

about 1 year ago

docker pull ireina/debian-bookworm-slim