now !
Some checks failed
Publish Docker Image / docker (push) Failing after 51s

This commit is contained in:
Lee
2024-09-28 18:13:30 +01:00
parent dea7a6647c
commit 2cbea618bd
2 changed files with 15 additions and 32 deletions

View File

@ -5,10 +5,6 @@ FROM alpine:3.20.3 AS builder
ARG NGINX_VERSION="1.27.1"
ARG PHP_VERSION="8.3"
# Print versions
RUN echo "NGINX_VERSION=${NGINX_VERSION}"
RUN echo "PHP_VERSION=${PHP_VERSION}"
# Install build dependencies and required tools
RUN apk update && apk upgrade && \
apk add --no-cache build-base pcre-dev openssl-dev zlib-dev linux-headers
@ -39,7 +35,7 @@ COPY ./docker/index.html /tmp/index.html
COPY ./public /tmp/public
# Stage 2: Create a smaller production image
FROM alpine:3.20.3
FROM alpine:3.20.1
# Copy Nginx and PHP-FPM binaries and configurations from the builder stage
COPY --from=builder /usr/local/nginx /usr/local/nginx
@ -52,13 +48,10 @@ COPY --from=builder /tmp/public /tmp/public
# Install runtime dependencies
RUN apk update && apk upgrade && \
apk add --no-cache php${PHP_VERSION} php${PHP_VERSION}-fpm php${PHP_VERSION}-gd pcre
apk add --no-cache php81 php81-fpm php81-gd pcre
# Cleanup unnecessary files
RUN rm -rf /var/cache/apk/*
# Ensure signals are passed through
STOPSIGNAL SIGTERM
# Start server
CMD ["sh", "/start.sh"]