mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00

* refactor(docker): Combine RUN statements to reduce number of image layers * Add --update && --no-cache to apk add command * Combine RUN statements in first stage * Consolidate COPY commands from BUILD_IMAGE * Add docs & snap to .dockerignore * Revert first COPY statement in 2nd stage * Write committag.json in first stage & only do one COPY Also pin base image Alpine version, and add Docker & GitHub Actions update monitoring via Dependabot * Bump node to 14.15.4 * Change base image to node:14.15-alpine and remove Dependabot Docker monitoring * Changes in response to PR comments * Remove ARG/ENV statements from second build stage
32 lines
512 B
Docker
32 lines
512 B
Docker
FROM node:14.15-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 echo "{\"commitTag\": \"${COMMIT_TAG}\"}" > committag.json
|
|
|
|
|
|
FROM node:14.15-alpine
|
|
|
|
RUN apk add --no-cache tzdata
|
|
|
|
# copy from build image
|
|
COPY --from=BUILD_IMAGE /app /app
|
|
WORKDIR /app
|
|
|
|
CMD yarn start
|
|
|
|
EXPOSE 5055
|