nginx cleaned and works with alpine (45s instead of 180s, 4 times faster
+ in Makefile resolved super-clean rule + wordpress and mariadb pbm connections
This commit is contained in:
@@ -1,19 +1,43 @@
|
||||
FROM debian:buster
|
||||
# debian (~ 180s) --------------------------------------------
|
||||
|
||||
RUN apt update && apt install -y \
|
||||
nginx openssl
|
||||
RUN rm -rf /var/lib/apt/lists/*
|
||||
# FROM debian:buster
|
||||
#
|
||||
# # vim for debug
|
||||
# RUN apt update && apt install -y \
|
||||
# nginx openssl \
|
||||
# vim \
|
||||
# && \
|
||||
# rm -rf /var/lib/apt/lists/*
|
||||
#
|
||||
# # nginx conf
|
||||
# COPY ./conf/nginx_debian.conf /etc/nginx/nginx.conf
|
||||
|
||||
# alpine (~ 45s) ---------------------------------------------
|
||||
|
||||
FROM alpine:3.15
|
||||
|
||||
# vim and bash for debug
|
||||
RUN apk update && apk add \
|
||||
nginx openssl \
|
||||
vim bash \
|
||||
&& \
|
||||
rm -rf /var/cache/apk*
|
||||
|
||||
# nginx conf
|
||||
COPY ./conf/nginx_alpine.conf /etc/nginx/nginx.conf
|
||||
|
||||
# common -----------------------------------------------------
|
||||
|
||||
# inception conf & personalized index.html
|
||||
COPY ./conf/inception_nginx.conf /etc/nginx/conf.d/
|
||||
COPY ./conf/index.html /data/www/
|
||||
|
||||
# create ssl certificate
|
||||
RUN mkdir -p /etc/ssl/private /etc/ssl/certs
|
||||
RUN openssl req -newkey rsa:2048 -nodes -x509 -days 365 \
|
||||
-keyout /etc/ssl/private/hulamy.42.fr.key -out /etc/ssl/certs/hulamy.42.fr.crt \
|
||||
-subj "/C=fr/ST=ile-de-france/L=paris/O=42/OU=inception/CN=hulamy.42.fr"
|
||||
|
||||
# import sites conf files
|
||||
COPY ./conf/nginx.conf /etc/nginx/
|
||||
COPY ./conf/inception_nginx.conf /etc/nginx/conf.d/
|
||||
|
||||
COPY ./conf/index.html /data/www/
|
||||
-subj "/C=fr/ST=ile-de-france/L=paris/O=42/OU=inception/CN=hulamy.42.fr" \
|
||||
-keyout /etc/ssl/private/hulamy.42.fr.key \
|
||||
-out /etc/ssl/certs/hulamy.42.fr.crt
|
||||
|
||||
ENTRYPOINT [ "nginx", "-g", "daemon off;" ]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user