-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
8.2.Dockerfile
43 lines (34 loc) · 1.28 KB
/
8.2.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM alpine:3.19
LABEL maintainer="[email protected]"
ARG S6_OVERLAY_VERSION=1.22.1.0
ARG BUILDPLATFORM
# Install webserver packages
RUN apk -U upgrade && apk add --no-cache \
curl \
nginx \
php82-fpm \
tzdata \
&& ln -s /usr/sbin/php-fpm82 /usr/sbin/php-fpm \
&& addgroup -S php \
&& adduser -S -G php php \
&& rm -rf /var/cache/apk/* /etc/nginx/http.d/* /etc/php82/conf.d/* /etc/php82/php-fpm.d/*
# Install S6 overlay
RUN case "${BUILDPLATFORM}" in \
"linux/amd64") \
wget -P /tmp https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-amd64.tar.gz && \
gunzip -c /tmp/s6-overlay-amd64.tar.gz | tar -xf - -C / \
;; \
"linux/arm64") \
wget -P /tmp https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-arm.tar.gz && \
gunzip -c /tmp/s6-overlay-arm.tar.gz | tar -xf - -C / \
;; \
*) \
echo "Cannot build, missing valid build platform." \
exit 1; \
esac; \ esac; \
rm -rf /tmp/*;
COPY files/general files/php82 /
WORKDIR /www
ENTRYPOINT ["/init"]
EXPOSE 80
HEALTHCHECK --interval=5s --timeout=5s CMD curl -f http://127.0.0.1/php-fpm-ping || exit 1