Fix Dockerfile FromAsCasing warnings (#20388)

GitOrigin-RevId: 6d6be3ba17eec695907dde25da2dbe98818fae10
This commit is contained in:
Alf Eaton 2024-09-20 15:03:26 +01:00 committed by Copybot
parent 250acbf33c
commit 2976fd0b44
14 changed files with 34 additions and 34 deletions

View file

@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from
# https://github.com/overleaf/internal/
FROM node:18.20.2 as base
FROM node:18.20.2 AS base
WORKDIR /overleaf/services/chat
@ -10,7 +10,7 @@ WORKDIR /overleaf/services/chat
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
RUN mkdir /home/node/.config && chown node:node /home/node/.config
FROM base as app
FROM base AS app
COPY package.json package-lock.json /overleaf/
COPY services/chat/package.json /overleaf/services/chat/

View file

@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from
# https://github.com/overleaf/internal/
FROM node:18.20.2 as base
FROM node:18.20.2 AS base
WORKDIR /overleaf/services/clsi
COPY services/clsi/install_deps.sh /overleaf/services/clsi/
@ -14,7 +14,7 @@ COPY services/clsi/entrypoint.sh /
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
RUN mkdir /home/node/.config && chown node:node /home/node/.config
FROM base as app
FROM base AS app
COPY package.json package-lock.json /overleaf/
COPY services/clsi/package.json /overleaf/services/clsi/

View file

@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from
# https://github.com/overleaf/internal/
FROM node:18.20.2 as base
FROM node:18.20.2 AS base
WORKDIR /overleaf/services/contacts
@ -10,7 +10,7 @@ WORKDIR /overleaf/services/contacts
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
RUN mkdir /home/node/.config && chown node:node /home/node/.config
FROM base as app
FROM base AS app
COPY package.json package-lock.json /overleaf/
COPY services/contacts/package.json /overleaf/services/contacts/

View file

@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from
# https://github.com/overleaf/internal/
FROM node:18.20.2 as base
FROM node:18.20.2 AS base
WORKDIR /overleaf/services/docstore
@ -10,7 +10,7 @@ WORKDIR /overleaf/services/docstore
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
RUN mkdir /home/node/.config && chown node:node /home/node/.config
FROM base as app
FROM base AS app
COPY package.json package-lock.json /overleaf/
COPY services/docstore/package.json /overleaf/services/docstore/

View file

@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from
# https://github.com/overleaf/internal/
FROM node:18.20.2 as base
FROM node:18.20.2 AS base
WORKDIR /overleaf/services/document-updater
@ -10,7 +10,7 @@ WORKDIR /overleaf/services/document-updater
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
RUN mkdir /home/node/.config && chown node:node /home/node/.config
FROM base as app
FROM base AS app
COPY package.json package-lock.json /overleaf/
COPY services/document-updater/package.json /overleaf/services/document-updater/

View file

@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from
# https://github.com/overleaf/internal/
FROM node:18.20.2 as base
FROM node:18.20.2 AS base
WORKDIR /overleaf/services/filestore
COPY services/filestore/install_deps.sh /overleaf/services/filestore/
@ -12,7 +12,7 @@ RUN chmod 0755 ./install_deps.sh && ./install_deps.sh
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
RUN mkdir /home/node/.config && chown node:node /home/node/.config
FROM base as app
FROM base AS app
COPY package.json package-lock.json /overleaf/
COPY services/filestore/package.json /overleaf/services/filestore/

View file

@ -1,6 +1,6 @@
# Dockerfile for git-bridge
FROM maven:3-amazoncorretto-21-debian as base
FROM maven:3-amazoncorretto-21-debian AS base
RUN apt-get update && apt-get install -y make git sqlite3 \
&& rm -rf /var/lib/apt/lists
@ -10,7 +10,7 @@ RUN chmod +x /opt/envsubst
RUN useradd --create-home node
FROM base as builder
FROM base AS builder
COPY . /app

View file

@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from
# https://github.com/overleaf/internal/
FROM node:18.20.2 as base
FROM node:18.20.2 AS base
WORKDIR /overleaf/services/history-v1
@ -13,7 +13,7 @@ RUN mkdir /home/node/.config && chown node:node /home/node/.config
# fs persistor needs a writable folder as a target for the mounted volume
RUN mkdir /buckets && chown node:node /buckets
FROM base as app
FROM base AS app
COPY package.json package-lock.json /overleaf/
COPY services/history-v1/package.json /overleaf/services/history-v1/

View file

@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from
# https://github.com/overleaf/internal/
FROM node:18.20.2 as base
FROM node:18.20.2 AS base
WORKDIR /overleaf/services/notifications
@ -10,7 +10,7 @@ WORKDIR /overleaf/services/notifications
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
RUN mkdir /home/node/.config && chown node:node /home/node/.config
FROM base as app
FROM base AS app
COPY package.json package-lock.json /overleaf/
COPY services/notifications/package.json /overleaf/services/notifications/

View file

@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from
# https://github.com/overleaf/internal/
FROM node:18.20.2 as base
FROM node:18.20.2 AS base
WORKDIR /overleaf/services/project-history
@ -10,7 +10,7 @@ WORKDIR /overleaf/services/project-history
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
RUN mkdir /home/node/.config && chown node:node /home/node/.config
FROM base as app
FROM base AS app
COPY package.json package-lock.json /overleaf/
COPY services/project-history/package.json /overleaf/services/project-history/

View file

@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from
# https://github.com/overleaf/internal/
FROM node:18.20.2 as base
FROM node:18.20.2 AS base
WORKDIR /overleaf/services/real-time
@ -10,7 +10,7 @@ WORKDIR /overleaf/services/real-time
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
RUN mkdir /home/node/.config && chown node:node /home/node/.config
FROM base as app
FROM base AS app
COPY package.json package-lock.json /overleaf/
COPY services/real-time/package.json /overleaf/services/real-time/

View file

@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from
# https://github.com/overleaf/internal/
FROM node:18.20.2 as base
FROM node:18.20.2 AS base
WORKDIR /overleaf/services/spelling
COPY services/spelling/install_deps.sh /overleaf/services/spelling/
@ -12,7 +12,7 @@ RUN chmod 0755 ./install_deps.sh && ./install_deps.sh
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
RUN mkdir /home/node/.config && chown node:node /home/node/.config
FROM base as app
FROM base AS app
COPY package.json package-lock.json /overleaf/
COPY services/spelling/package.json /overleaf/services/spelling/

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

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