You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
537 B
34 lines
537 B
FROM node:14.16-alpine AS BUILD_IMAGE
|
|
|
|
ARG COMMIT_TAG
|
|
ENV COMMIT_TAG=${COMMIT_TAG}
|
|
|
|
COPY . /app
|
|
WORKDIR /app
|
|
|
|
RUN yarn --frozen-lockfile && \
|
|
yarn build
|
|
|
|
# remove development dependencies
|
|
RUN yarn install --production --ignore-scripts --prefer-offline
|
|
|
|
RUN rm -rf src && \
|
|
rm -rf server
|
|
|
|
RUN touch config/DOCKER
|
|
|
|
RUN echo "{\"commitTag\": \"${COMMIT_TAG}\"}" > committag.json
|
|
|
|
|
|
FROM node:14.16-alpine
|
|
|
|
RUN apk add --no-cache tzdata
|
|
|
|
# copy from build image
|
|
COPY --from=BUILD_IMAGE /app /app
|
|
WORKDIR /app
|
|
|
|
CMD yarn start
|
|
|
|
EXPOSE 5055
|