-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (14 loc) · 718 Bytes
/
Dockerfile
File metadata and controls
23 lines (14 loc) · 718 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM nginx:1.22.0-alpine
WORKDIR /
COPY ./config /
COPY ./src/nxconf.sh /
RUN chmod +x /nxconf.sh && /nxconf.sh
RUN mkdir -p /var/log/nginx /var/cache/nginx /var/run/nginx && \
chown -R nginx:nginx /var/log/nginx /var/run/nginx /var/cache/nginx /etc/nginx && \
sed -e 's#/var/run/nginx.pid#/var/run/nginx/nginx.pid#' -e '/user nginx;/d' -i /etc/nginx/nginx.conf
RUN echo "server_names_hash_bucket_size 128;" >/etc/nginx/conf.d/_server_name_hash.conf
RUN echo "client_max_body_size 1g;" >/etc/nginx/conf.d/my_proxy.conf
RUN echo -e "map \$http_upgrade \$connection_upgrade {\n default upgrade;\n '' close;\n}" >/etc/nginx/conf.d/_websocks.conf
EXPOSE 80
USER nginx
CMD ["nginx", "-g", "daemon off;"]