-
Notifications
You must be signed in to change notification settings - Fork 60
/
Dockerfile_front
31 lines (22 loc) · 848 Bytes
/
Dockerfile_front
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
FROM ubuntu:18.04
ARG VERSION
ENV API_BASE_URL=${API_BASE_URL}
ENV VERSION=${VERSION}
COPY nginx.site.default.conf /
COPY entrypoint_front.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 nginx && \
apt-get install -y wget && \
apt-get clean && apt-get autoclean
RUN cd /tmp && \
wget https://github.com/AbelChe/cola_dnslog/releases/download/${VERSION}/cola_dnslog-front.tar.gz
RUN rm -rf /var/www/html/* && \
tar -zxvf /tmp/cola_dnslog-front.tar.gz -C /var/www/html/
RUN mv /nginx.site.default.conf /etc/nginx/sites-enabled/default && \
chmod +x /entrypoint_front.sh
EXPOSE 80
ENTRYPOINT [ "/entrypoint_front.sh" ]