Standardize Dockerfile stage naming convention
Updated all Dockerfile stage names to adhere to a consistent lowercase naming convention with underscores. This improves readability and aligns with best practices for naming Docker build stages.
This commit is contained in:
parent
cb2161356e
commit
c4817a675a
@ -1,4 +1,4 @@
|
||||
FROM docker.io/php:8.3-zts-alpine3.18 AS UNIT_BUILDER
|
||||
FROM docker.io/php:8.3-zts-alpine3.18 AS unit_builder
|
||||
|
||||
ARG UNIT_VERSION=1.31.1
|
||||
|
||||
@ -12,10 +12,10 @@ RUN apk --no-cache add pcre2-dev gcc git musl-dev make && \
|
||||
make && \
|
||||
make install
|
||||
|
||||
FROM docker.io/php:8.3-zts-alpine3.18 as BUILD
|
||||
FROM docker.io/php:8.3-zts-alpine3.18 AS build
|
||||
|
||||
COPY --from=UNIT_BUILDER /var/sbin/unitd /usr/sbin/unitd
|
||||
COPY --from=UNIT_BUILDER /var/lib/unit/ /var/lib/unit/
|
||||
COPY --from=unit_builder /var/sbin/unitd /usr/sbin/unitd
|
||||
COPY --from=unit_builder /var/lib/unit/ /var/lib/unit/
|
||||
|
||||
COPY docker/unit-config.json /docker-entrypoint.d/config.json
|
||||
|
||||
@ -48,7 +48,7 @@ RUN apk --no-cache add pcre2 libbz2 libpng libwebp libjpeg-turbo icu-libs freety
|
||||
&& ln -sf /dev/stdout /var/log/unit.log \
|
||||
&& addgroup -S unit && adduser -S unit -G unit
|
||||
|
||||
FROM BUILD as APP_BUILD_FOR_PRODUCTION
|
||||
FROM build AS app_build_for_production
|
||||
WORKDIR /home/app
|
||||
|
||||
COPY application /home/app
|
||||
@ -60,9 +60,9 @@ RUN apk --no-cache add git nodejs npm \
|
||||
&& rm -rf /home/app/node_modules /home/app/.env
|
||||
|
||||
|
||||
FROM BUILD AS PRODUCTION
|
||||
FROM build AS production
|
||||
|
||||
COPY --from=APP_BUILD_FOR_PRODUCTION /home/app /var/www/html
|
||||
COPY --from=app_build_for_production /home/app /var/www/html
|
||||
COPY docker/docker-entrypoint_prod.sh /home/unit/docker-entrypoint.sh
|
||||
COPY docker/start.sh /usr/local/bin/start
|
||||
|
||||
@ -78,7 +78,7 @@ EXPOSE 9000
|
||||
CMD ["/usr/local/bin/start"]
|
||||
|
||||
|
||||
FROM BUILD AS DEVELOP
|
||||
FROM build AS develop
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
@ -99,13 +99,13 @@ CMD ["/usr/local/bin/start"]
|
||||
|
||||
|
||||
|
||||
FROM BUILD AS ARTISAN
|
||||
FROM build AS artisan
|
||||
WORKDIR /var/www/html
|
||||
STOPSIGNAL SIGTERM
|
||||
ENTRYPOINT ["php", "/var/www/html/artisan"]
|
||||
|
||||
|
||||
FROM BUILD AS COMPOSER
|
||||
FROM build AS composer
|
||||
WORKDIR /var/www/html
|
||||
STOPSIGNAL SIGTERM
|
||||
RUN apk --no-cache add git \
|
||||
@ -115,7 +115,7 @@ ENTRYPOINT ["composer"]
|
||||
|
||||
|
||||
|
||||
FROM BUILD AS NPM
|
||||
FROM build AS npm
|
||||
RUN mkdir "/.npm" && chmod -R 0777 "/.npm"
|
||||
WORKDIR /var/www/html
|
||||
STOPSIGNAL SIGTERM
|
||||
|
Loading…
x
Reference in New Issue
Block a user