-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
34 lines (27 loc) · 854 Bytes
/
Dockerfile
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
FROM nginx:stable
EXPOSE 80
EXPOSE 443
# install modules
RUN apt-get update
RUN apt-get install certbot python3-certbot-nginx npm nodejs net-tools cron logrotate dnsutils -y
RUN apt-get upgrade -y
# system configuration
RUN echo "net.ipv4.tcp_fin_timeout=3" >> /etc/sysctl.conf
# copy and config
COPY container_files/default_nginx.conf /nginx_config/default_nginx.conf
COPY container_files/default_config.json /nginx_config/default_config.json
RUN cp /nginx_config/default_nginx.conf /etc/nginx/nginx.conf
COPY admin /admin
COPY container_files/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
RUN mkdir -p /data
RUN mkdir -p /session
RUN rm -f /var/log/nginx/*
# install bower components
WORKDIR /admin/static
RUN npm install -g bower
RUN bower install
# change to node folder
WORKDIR /admin
RUN npm install
ENTRYPOINT ["/entrypoint.sh"]