14 lines
384 B
Docker
14 lines
384 B
Docker
FROM alpine:3.17
|
|
|
|
RUN apk update
|
|
RUN apk add nginx openssl
|
|
|
|
RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
|
|
-keyout /etc/ssl/private/nginx-selfsigned.key \
|
|
-out /etc/ssl/certs/nginx-selfsigned.crt \
|
|
-subj "/C=FR/ST=Nouvelle Aquitaine/L=Angouleme/O=42 Angouleme/CN=cchauvet.42.fr"
|
|
|
|
COPY nginx.conf /etc/nginx/http.d/default.conf
|
|
|
|
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|