-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
37 lines (31 loc) · 883 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
ARG BASE_IMAGE=docker.io/debian:12
FROM ${BASE_IMAGE} AS build
ENV DEBIAN_FRONTEND=noninteractive
ARG USER_NAME=tobi
ARG USER_HOME=/home/$USER_NAME
RUN apt update && apt install -y \
dnsutils \
git \
iputils-ping \
locales \
make \
nmap \
openssl \
ssh \
sudo \
wget \
zsh \
&& rm -rf /var/lib/apt/lists/* \
&& sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen && sudo locale-gen \
&& useradd -ms /bin/zsh "$USER_NAME" \
&& echo "$USER_NAME ALL=(ALL) NOPASSWD:ALL" > "/etc/sudoers.d/$USER_NAME" \
&& chmod 440 "/etc/sudoers.d/$USER_NAME"
ENV USER=$USER_NAME
ENV HOME=$USER_HOME
USER $USER_NAME
WORKDIR $HOME
RUN git clone https://github.com/this-is-tobi/dotfiles && touch ./.zshrc \
&& ./dotfiles/setup/setup-debian.sh -p "base,devops,secops" -d -c -l \
&& sudo rm -rf /tmp/* \
&& sudo rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["/bin/zsh"]