Dockerfile build args

This commit is contained in:
Jörn-Michael Miehe 2023-10-27 15:10:25 +00:00
parent 0567cd9a4f
commit ce29116e88

View file

@ -2,7 +2,8 @@
# build ui # # build ui #
############ ############
FROM node:18.16 AS build-ui ARG NODE_VERSION=18.16
FROM node:${NODE_VERSION} AS build-ui
# env setup # env setup
WORKDIR /usr/local/src/advent22_ui WORKDIR /usr/local/src/advent22_ui
@ -19,7 +20,8 @@ RUN yarn build --dest /tmp/advent22_ui/html
# web app # # web app #
########### ###########
FROM tiangolo/uvicorn-gunicorn:python3.11-slim AS production ARG PYTHON_VERSION=3.11
FROM tiangolo/uvicorn-gunicorn:python${PYTHON_VERSION}-slim AS production
# add prepared advent22_ui # add prepared advent22_ui
COPY --from=build-ui /tmp/advent22_ui /usr/local/share/advent22_ui COPY --from=build-ui /tmp/advent22_ui /usr/local/share/advent22_ui