Fix Dockerfile FromAsCasing warnings (#20388)

GitOrigin-RevId: 6d6be3ba17eec695907dde25da2dbe98818fae10
This commit is contained in:
Alf Eaton
2024-09-23 08:04:52 +00:00
committed by Copybot
parent 250acbf33c
commit 2976fd0b44
14 changed files with 34 additions and 34 deletions
+9 -9
View File
@@ -1,6 +1,6 @@
# the base image is suitable for running web with /overleaf/services/web bind
# mounted
FROM node:18.20.2 as base
FROM node:18.20.2 AS base
WORKDIR /overleaf/services/web
@@ -22,7 +22,7 @@ RUN mkdir -p /overleaf/services/web/data/dumpFolder \
# the deps image is used for caching npm ci
FROM base as deps-prod
FROM base AS deps-prod
COPY package.json package-lock.json /overleaf/
COPY services/web/package.json /overleaf/services/web/
@@ -31,7 +31,7 @@ COPY patches/ /overleaf/patches/
RUN cd /overleaf && NODE_ENV=production npm ci --quiet
FROM deps-prod as deps
FROM deps-prod AS deps
ENV CYPRESS_INSTALL_BINARY=0
@@ -40,7 +40,7 @@ RUN cd /overleaf && npm install
# the dev is suitable for running tests
FROM deps as dev
FROM deps AS dev
ARG SENTRY_RELEASE
ENV SENTRY_RELEASE=$SENTRY_RELEASE
@@ -53,18 +53,18 @@ USER node
# the webpack image has deps+src+webpack artifacts
FROM dev as webpack
FROM dev AS webpack
USER root
RUN chmod 0755 ./install_deps.sh && ./install_deps.sh
# intermediate image for removing source maps ahead of copying into final production image
FROM webpack as webpack-no-sourcemaps
FROM webpack AS webpack-no-sourcemaps
RUN find /overleaf/services/web/public -name '*.js.map' -delete
# copy source code and precompile pug images
FROM deps-prod as pug
FROM deps-prod AS pug
COPY services/web /overleaf/services/web
# Omit Server Pro/CE specific scripts from SaaS image
RUN rm /overleaf/services/web/modules/server-ce-scripts -rf
@@ -72,13 +72,13 @@ RUN OVERLEAF_CONFIG=/overleaf/services/web/config/settings.overrides.saas.js npm
# the web image with only production dependencies but no webpack production build, for development
FROM pug as app-only
FROM pug AS app-only
USER node
CMD ["node", "--expose-gc", "app.js"]
# the final production image, with webpack production build but without source maps
FROM pug as app
FROM pug AS app
ARG SENTRY_RELEASE
ENV SENTRY_RELEASE=$SENTRY_RELEASE
COPY --from=webpack-no-sourcemaps /overleaf/services/web/public /overleaf/services/web/public
+1 -1
View File
@@ -3,7 +3,7 @@ ARG BRANCH_NAME
ARG BUILD_NUMBER
ARG CYPRESS_IMAGE
FROM ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER as dev
FROM ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER AS dev
FROM $CYPRESS_IMAGE
COPY --from=dev /overleaf /overleaf