-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.template
43 lines (36 loc) · 1.01 KB
/
Dockerfile.template
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
# ubuntu:22.04 LTS with systemd
# docker build -t u22-systemd .
FROM ubuntu:22.04
# arg
ARG DEBIAN_FRONTEND=noninteractive
# env
ENV TZ=Asia/Seoul \
SERVER_DOMAIN=[your_domain] \
WEB_ADDR1=apache2 \
WEB_ADDR2=apache2 \
WEB_N_LB_PORT=[your_port|recommand_80] \
INLB_ADDR=nginx2 \
WAS_ADDR1=tomcat1 \
WAS_ADDR2=tomcat2 \
DB_ADDR=mysql1 \
DB_USERNAME=[db_username] \
DB_PASSWORD=[db_password]
# install systemctl and etc package
RUN apt update \
&& apt install -qq -y init systemd \
&& apt install -qq -y build-essential \
&& apt install -qq -y tzdata locales gettext\
&& apt install -qq -y openssh-server \
&& apt install -qq -y vim curl net-tools\
&& apt-get clean autoclean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/{apt, dpkg, cache, log}
# ect work
RUN systemctl enable ssh
RUN echo 'your_name:your_password' | chpasswd
RUN locale-gen [your_language_pack]
ENV LC_ALL=[your_language_pack]
WORKDIR /root
EXPOSE 00000
# run systemctl
CMD ["/sbin/init"]