-
Notifications
You must be signed in to change notification settings - Fork 59
/
Dockerfile_server
39 lines (33 loc) · 1.32 KB
/
Dockerfile_server
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
FROM ubuntu:18.04
ENV DNS_DOMAIN=${DNS_DOMAIN}
ENV NS1_DOMAIN=${NS1_DOMAIN}
ENV NS2_DOMAIN=${NS2_DOMAIN}
ENV SERVER_IP=${SERVER_IP}
ENV HTTP_PORT=${HTTP_PORT}
ENV HTTP_RESPONSE_SERVER_VERSION=${HTTP_RESPONSE_SERVER_VERSION}
ENV LDAP_PORT=${LDAP_PORT}
ENV RMI_PORT=${RMI_PORT}
COPY src/app/ /coladnslog/src/app/
COPY src/logserver/ /coladnslog/src/logserver/
COPY message_templates/ /coladnslog/message_templates/
COPY start_logserver /coladnslog/start_logserver
COPY start_webserver /coladnslog/start_webserver
COPY requirements.txt /coladnslog/requirements.txt
COPY config.yaml /coladnslog/config.yaml
COPY entrypoint_server.sh /
RUN cd / && \
sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
sed -i 's/security.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
apt update && \
apt upgrade -y && \
apt-get install -y python3.7 && \
apt-get install -y python3.7-dev && \
apt-get install -y python3-pip && \
apt-get clean && apt-get autoclean && \
ln -s /usr/bin/python3.7 /usr/bin/python
RUN cd /coladnslog && \
python -m pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN chmod +x /entrypoint_server.sh && \
chmod +x /coladnslog/start_webserver && \
chmod +x /coladnslog/start_logserver
ENTRYPOINT [ "/entrypoint_server.sh" ]