-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
46 lines (36 loc) · 904 Bytes
/
Dockerfile
File metadata and controls
46 lines (36 loc) · 904 Bytes
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
FROM debian:bullseye
ARG USER_UID
ARG USER_GID
RUN \
useradd --shell /bin/bash --create-home --user-group nonroot && \
usermod --non-unique --uid ${USER_UID?} nonroot && \
groupmod --non-unique --gid ${USER_GID?} nonroot
RUN \
apt-get update && \
apt-get install -y --no-install-recommends \
# Obviously
ca-certificates=* \
zsh=* \
# For Nerd Fonts
locales=* \
# Required by "install.sh"
curl=* \
# Required by "deno compile"
unzip=* \
# For debugging
sudo=* \
&& \
rm -rf /var/lib/apt/lists/*
COPY <<EOF /etc/locale.gen
en_US.UTF-8 UTF-8
ja_JP.UTF-8 UTF-8
EOF
RUN locale-gen
ENV LANG en_US.UTF-8
RUN \
echo "nonroot ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/nonroot && \
chmod 0440 /etc/sudoers.d/nonroot
RUN install -o nonroot -g nonroot -d /home/nonroot/.dotfiles
USER nonroot
WORKDIR /home/nonroot/.dotfiles
CMD ["/bin/bash"]