-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (25 loc) · 954 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
FROM ubuntu:24.04
# Install dependencies
RUN sed -i 's/archive.ubuntu.com/ftp.kaist.ac.kr/g' /etc/apt/sources.list.d/ubuntu.sources && \
sed -i 's/security.ubuntu.com/ftp.kaist.ac.kr/g' /etc/apt/sources.list.d/ubuntu.sources
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
git \
vim \
curl \
wget \
unzip \
openssh-server \
sudo \
mysql-client
RUN userdel -r ubuntu && \
useradd -m -s /bin/bash sparcs && \
chown -R sparcs:sparcs /home/sparcs && \
adduser sparcs sudo && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
echo 'Banner /etc/banner' >> /etc/ssh/sshd_config
RUN su - sparcs -c 'curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash'
RUN tar czf /sparcs-home.tar.gz /home/sparcs
ADD docker-entrypoint.sh /docker-entrypoint.sh
ADD banner /etc/banner
RUN chmod +x /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]