Skip to content

Commit 1848e66

Browse files
committed
Use a stable Alpine version instead of edge to avoid untrusted signatures.
1 parent 810a107 commit 1848e66

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
FROM alpine:edge
2-
MAINTAINER Arnaud de Mouhy <[email protected]>
1+
# Use a stable Alpine version instead of edge to avoid untrusted signatures
2+
FROM alpine:3
3+
LABEL maintainer="Arnaud de Mouhy <[email protected]>"
34

45
ARG VCS_REF
56
ARG BUILD_DATE
@@ -14,10 +15,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
1415
org.label-schema.version=$VERSION \
1516
org.label-schema.schema-version="1.0"
1617

18+
# Copy custom configurations and scripts
1719
COPY rootfs /
20+
21+
# Expose port 80 for Adminer
1822
EXPOSE 80
1923

24+
# Run the build script and clean up
2025
RUN sh /build.sh && rm /build.sh
2126

27+
# Set the entrypoint to s6 supervisor
2228
ENTRYPOINT ["/bin/s6-svscan", "/etc/services.d"]
2329
CMD []

rootfs/build.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
set -eux
44

5+
# Install necessary packages, including SSL support
56
apk --update add \
67
s6 \
78
nginx \
@@ -13,7 +14,12 @@ apk --update add \
1314
php8-pecl-mongodb \
1415
php8-xml \
1516
php8-json \
16-
php8-session
17+
php8-session \
18+
openssl \
19+
ca-certificates
20+
21+
# Update CA certificates for SSL
22+
update-ca-certificates
1723

1824
# Fixing file upload rights
1925
chown -R nginx: /var/lib/nginx
@@ -28,4 +34,5 @@ sed -r -i -e 's/upload_max_filesize = [0-9]+M/upload_max_filesize = 2000M/g' \
2834
sed -r -i -e 's/;request_terminate_timeout = [0-9]+/request_terminate_timeout = 300/g' \
2935
/etc/php8/php-fpm.d/www.conf
3036

37+
# Ensure run scripts are executable
3138
find /etc/services.d -name run -exec chmod 755 {} \;

0 commit comments

Comments
 (0)