Skip to content

Commit a356967

Browse files
authored
Merge pull request #35 from reload/misc
Support more than one IP address
2 parents fa1ca36 + f2fb361 commit a356967

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
##
22
# Base
33
##
4-
FROM nginx:1.27.0-alpine3.19-slim@sha256:a529900d9252ce5d04531a4a594f93736dbbe3ec155a692d10484be82aaa159a AS base
4+
FROM nginx:1.27.3-alpine-slim@sha256:5a56ae385906c5b43ccc99379bce883aa93dc0556d7f705ba501d819925e8fa1 AS base
55

66
COPY /base /
77

88
RUN apk add --no-cache \
9-
ca-certificates=~20240226 \
9+
ca-certificates=~20241121 \
1010
gnutls-utils=~3
1111

1212
ARG workdir=/var/www

context/base/docker-entrypoint.d/20-certs.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@ CERT_KEY="/cert/${FIRST_VIRTUAL_HOST:-localhost}.key"
77
CA_CERT="/rootCA/rootCA.pem"
88
CA_KEY="/rootCA/rootCA-key.pem"
99

10-
IP_ADDRESS=$(hostname -i)
11-
export IP_ADDRESS
12-
1310
envsubst </etc/https-proxy/cert.cfg.template >/tmp/cert.cfg
1411

1512
for host in ${VIRTUAL_HOST:-localhost}; do
1613
echo "dns_name = $host" >>/tmp/cert.cfg
1714
done
1815

16+
for ip_address in $(hostname -i); do
17+
echo "ip_address = $ip_address" >>/tmp/cert.cfg
18+
done
19+
1920
certtool --generate-privkey --outfile "${CERT_KEY}"
2021

2122
if [ ! -r "${CA_CERT}" ] || [ ! -r "${CA_KEY}" ]; then

context/base/etc/https-proxy/cert.cfg.template

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ organization = "Development certificate"
22
unit = "${HOSTNAME}"
33
cn = "${FIRST_VIRTUAL_HOST}"
44
expiration_days = ${EXPIRATION_DAYS}
5-
ip_address = "${IP_ADDRESS}"

0 commit comments

Comments
 (0)