20 lines
651 B
Docker
20 lines
651 B
Docker
FROM nginx:latest
|
|
RUN <<EOF
|
|
set -x
|
|
SSLDIR="/etc/nginx/ssl.d"
|
|
mkdir -p "$SSLDIR"
|
|
cd "$SSLDIR"
|
|
openssl req -x509 \
|
|
-newkey rsa:4096 \
|
|
-keyout "$SSLDIR"/lovespeech.key.pem \
|
|
-out "$SSLDIR"/lovespeech.crt.pem \
|
|
-sha256 \
|
|
-days 3650 \
|
|
-nodes \
|
|
-subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=lovespeech"
|
|
ls -ialh "$SSLDIR"
|
|
EOF
|
|
COPY --chmod=0444 --chown=root:root ./etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
|
|
COPY --chmod=0555 --chown=root:root ./docker-entrypoint.d/ /docker-entrypoint.d/
|
|
COPY --chmod=0555 --chown=root:root ./srv/www/lovespeech /srv/www/lovespeech/
|
|
RUN ls /docker-entrypoint.d/
|