dev-containers/base-debian/Dockerfile
2024-09-14 18:26:24 +02:00

40 lines
908 B
Docker

ARG VARIANT="bookworm"
FROM debian:${VARIANT}
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
ca-certificates \
zsh \
vim \
tmux \
curl \
unzip \
git \
python3 \
build-essential \
libssl-dev \
sudo \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ARG USERNAME=dev
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME
RUN mkdir /workspace && chown -R $USERNAME:$USERNAME /workspace
USER $USERNAME
RUN git clone https://gitea.tomastm.com/tomas.mirchev/dotfiles.git ~/.dotfiles
RUN ~/.dotfiles/install.sh
SHELL ["/bin/zsh", "-c"]
WORKDIR /workspace
ENV w=/workspace
CMD ["zsh"]