-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfileBase
29 lines (24 loc) · 1.06 KB
/
DockerfileBase
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
FROM node:18-slim
# Update basic packages
RUN apt-get update && apt-get install -y nano supervisor openssh-server git bash wget curl locales libc6 libstdc++6 ca-certificates tar
RUN mkdir /run/sshd /root/.ssh \
&& chmod 0700 /root/.ssh \
&& ssh-keygen -A \
&& sed -i s/^#PasswordAuthentication\ yes/PasswordAuthentication\ no/ /etc/ssh/sshd_config \
&& sed -i s/root:!/"root:*"/g /etc/shadow \
# Welcome message
&& echo "Welcome to Diploi Tiny project!" > /etc/motd \
# Go to app folder by default
&& echo "cd /app;" >> /root/.bashrc
# Fix LC_ALL: cannot change locale (en_US.UTF-8) error
RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment && \
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && \
echo "LANG=en_US.UTF-8" > /etc/locale.conf && \
locale-gen en_US.UTF-8
# Gitconfig secrets and credential helper
RUN ln -s /etc/diploi-git/gitconfig /etc/gitconfig
COPY diploi-credential-helper /usr/local/bin
# Init and run supervisor
COPY runonce.sh /root/runonce.sh
COPY supervisord.conf /etc/supervisord.conf
CMD /usr/bin/supervisord -c /etc/supervisord.conf