-
Notifications
You must be signed in to change notification settings - Fork 60
/
.dockerfile_base
56 lines (48 loc) · 1.42 KB
/
.dockerfile_base
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM ubuntu:22.04
LABEL maintainer="Christopher Krah <[email protected]>"
ENV DEBIAN_FRONTEND noninteractive
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update && \
apt-get upgrade -yq && \
set -e && \
apt-get install -yq --no-install-recommends sudo \
git \
wget \
build-essential \
gcc \
make \
file \
unzip \
python3 \
python3-pip \
python3-dev \
perl \
g++ \
curl \
openssh-server \
apt-utils \
locales \
vim \
wget \
zsh && \
python3 -m pip install --upgrade --no-cache-dir pip && \
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=en_US.UTF-8 && \
apt-get -y autoremove --purge && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p /var/run/sshd
ENV USER_UID=1000
ENV HOST_GID=1000
ENV SHELL="/bin/bash"
ARG USER
RUN groupadd -g $HOST_GID $USER && \
useradd -l -u $USER_UID -g $HOST_GID -s $SHELL -m -p "$(openssl passwd -1 $USER)" $USER && \
usermod -aG sudo $USER && \
sed -ir "/^$USER/ { s/:x:/::/ }" /etc/passwd && \
mkdir -p /home/$USER/.ssh && \
echo "Defaults lecture = never" | tee -a /etc/sudoers.d/privacy
WORKDIR /home/$USER
COPY .ssh/like.id_rsa.pub .ssh/authorized_keys
WORKDIR /io