-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.3.2-18
86 lines (75 loc) · 2.74 KB
/
Dockerfile.3.2-18
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
FROM ruby:3.2-bullseye
RUN set -ex \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends ca-certificates apt-transport-https \
curl wget net-tools dnsutils mtr telnet rsync git-core htop iftop screen vim \
cron supervisor locales openssh-server bzip2 libfontconfig less \
default-mysql-client imagemagick redis-tools netcat logrotate postgresql-client-13 \
&& rm -rf /var/lib/apt/lists/*
RUN set -ex \
&& { \
echo '[program:cron]'; \
echo 'command=/usr/sbin/cron -f'; \
} >> /etc/supervisor/conf.d/cron.conf \
\
&& mkdir -p /var/log/supervisor \
&& { \
echo '[supervisord]'; \
echo 'nodaemon=true'; \
} >> /etc/supervisor/conf.d/supervisord.conf \
\
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& locale-gen \
&& update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en: \
\
&& mkdir -p /var/run/sshd \
&& { \
echo '[program:sshd]'; \
echo 'command=/usr/sbin/sshd -D'; \
} >> /etc/supervisor/conf.d/sshd.conf
ENV LC_ALL en_US.UTF-8
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 \
&& echo "deb http://nginx.org/packages/debian/ $(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release) nginx" >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
ca-certificates \
nginx \
&& { \
echo '[program:nginx]'; \
echo 'command=nginx -g "daemon off;"'; \
} >> /etc/supervisor/conf.d/nginx.conf \
&& rm -rf /var/lib/apt/lists/*
RUN set -ex \
&& curl -sL https://deb.nodesource.com/setup_14.x | bash - \
&& apt-get update \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get install --no-install-recommends yarn \
&& rm -rf /var/lib/apt/lists/*
RUN set -ex \
&& ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& dpkg-reconfigure -f noninteractive tzdata \
&& mkdir -p /root/.ssh \
&& { \
echo 'Host *'; \
echo 'ServerAliveInterval=15'; \
echo 'ServerAliveCountMax=6'; \
echo 'ForwardAgent yes'; \
} >> /root/.ssh/config \
&& mkdir -p /root/.bash.d \
&& touch /root/.app.bash \
&& { \
echo 'source ~/.bash.d/10_ssh-agent.bash'; \
echo 'source ~/.app.bash'; \
echo "export TERM=xterm"; \
echo "export PATH=$(echo $PATH)"; \
echo "unset HISTFILE"; \
} >> /root/.bashrc
COPY files/bash.d/10_ssh-agent.bash /root/.bash.d/
WORKDIR /app
EXPOSE 22 80 3000
CMD ["sh", "-c", "env >> /etc/environment ; /usr/bin/supervisord"]