Dockerfile fixes (#6905)

- Change "as" to "AS"
This commit is contained in:
Oliver 2024-04-02 12:14:04 +11:00 committed by GitHub
parent cfff6ad93e
commit c65f7dce14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,7 +10,7 @@
# - Monitors source files for any changes, and live-reloads server
ARG base_image=python:3.11-alpine3.18
FROM ${base_image} as inventree_base
FROM ${base_image} AS inventree_base
# Build arguments for this image
ARG commit_tag=""
@ -92,7 +92,7 @@ RUN chmod +x init.sh
ENTRYPOINT ["/bin/ash", "./init.sh"]
FROM inventree_base as prebuild
FROM inventree_base AS prebuild
ENV PATH=/root/.local/bin:$PATH
RUN ./install_build_packages.sh --no-cache --virtual .build-deps && \
@ -100,7 +100,7 @@ RUN ./install_build_packages.sh --no-cache --virtual .build-deps && \
apk --purge del .build-deps
# Frontend builder image:
FROM prebuild as frontend
FROM prebuild AS frontend
RUN apk add --no-cache --update nodejs npm && npm install -g yarn
RUN yarn config set network-timeout 600000 -g
@ -112,7 +112,7 @@ RUN cd ${INVENTREE_HOME}/InvenTree && inv frontend-compile
# InvenTree production image:
# - Copies required files from local directory
# - Starts a gunicorn webserver
FROM inventree_base as production
FROM inventree_base AS production
ENV INVENTREE_DEBUG=False
@ -129,11 +129,9 @@ COPY InvenTree ./InvenTree
COPY --from=frontend ${INVENTREE_HOME}/InvenTree/web/static/web ./InvenTree/web/static/web
# Launch the production server
# TODO: Work out why environment variables cannot be interpolated in this command
# TODO: e.g. -b ${INVENTREE_WEB_ADDR}:${INVENTREE_WEB_PORT} fails here
CMD gunicorn -c ./gunicorn.conf.py InvenTree.wsgi -b 0.0.0.0:8000 --chdir ./InvenTree
FROM inventree_base as dev
FROM inventree_base AS dev
# Vite server (for local frontend development)
EXPOSE 5173