-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (25 loc) · 959 Bytes
/
Dockerfile
File metadata and controls
33 lines (25 loc) · 959 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
FROM ubuntu:24.04
# Avoid interactive prompts during apt operations
ENV DEBIAN_FRONTEND=noninteractive
# Base tools + locale support + zsh + optional utilities.
RUN apt-get update && \
apt-get install -y \
sudo dialog vim git curl locales python3-pip zsh \
net-tools apt-utils openssh-server \
htop tree glances && \
rm -rf /var/lib/apt/lists/*
# Generate UTF-8 locale and set it as default.
RUN locale-gen en_US.UTF-8 && \
update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
# Create a non-root user with sudo privileges.
# NOTE: We keep GID/UID fixed for convenience when bind-mounting from host.
RUN groupadd -g 1100 user && \
useradd -r -m -d /home/user -s /usr/bin/zsh -g root -G sudo -u 1100 user
# sshd needs its runtime directory. This is harmless even if you do not use ssh.
RUN mkdir -p /var/run/sshd
CMD ["/usr/sbin/sshd", "-D"]
EXPOSE 22
WORKDIR /home/user
# EOF