🎨(dockerfile) fix FromAsCasing warnings

Warning where raised because of the casing change between
`FROM` and `as`.
This commit is contained in:
Quentin BEY
2024-11-15 16:36:14 +01:00
committed by BEY Quentin
parent 8e6b6318c9
commit 478a3ffbd1

View File

@@ -1,7 +1,7 @@
# Django People # Django People
# ---- base image to inherit from ---- # ---- base image to inherit from ----
FROM python:3.12.6-alpine3.20 as base FROM python:3.12.6-alpine3.20 AS base
# Upgrade pip to its latest release to speed up dependencies installation # Upgrade pip to its latest release to speed up dependencies installation
RUN python -m pip install --upgrade pip setuptools RUN python -m pip install --upgrade pip setuptools
@@ -11,7 +11,7 @@ RUN apk update && \
apk upgrade apk upgrade
### ---- Front-end dependencies image ---- ### ---- Front-end dependencies image ----
FROM node:20 as frontend-deps FROM node:20 AS frontend-deps
WORKDIR /deps WORKDIR /deps
@@ -24,7 +24,7 @@ COPY ./src/frontend/packages/eslint-config-people/package.json ./packages/eslint
RUN yarn --frozen-lockfile RUN yarn --frozen-lockfile
### ---- Front-end builder dev image ---- ### ---- Front-end builder dev image ----
FROM node:20 as frontend-builder-dev FROM node:20 AS frontend-builder-dev
WORKDIR /builder WORKDIR /builder
@@ -34,12 +34,12 @@ COPY ./src/frontend .
WORKDIR ./apps/desk WORKDIR ./apps/desk
### ---- Front-end builder image ---- ### ---- Front-end builder image ----
FROM frontend-builder-dev as frontend-builder FROM frontend-builder-dev AS frontend-builder
RUN yarn build RUN yarn build
# ---- Front-end image ---- # ---- Front-end image ----
FROM nginxinc/nginx-unprivileged:1.26-alpine as frontend-production FROM nginxinc/nginx-unprivileged:1.26-alpine AS frontend-production
# Un-privileged user running the application # Un-privileged user running the application
ARG DOCKER_USER ARG DOCKER_USER
@@ -60,7 +60,7 @@ CMD ["nginx", "-g", "daemon off;"]
# ---- Back-end builder image ---- # ---- Back-end builder image ----
FROM base as back-builder FROM base AS back-builder
WORKDIR /builder WORKDIR /builder
@@ -72,7 +72,7 @@ RUN mkdir /install && \
# ---- mails ---- # ---- mails ----
FROM node:20 as mail-builder FROM node:20 AS mail-builder
COPY ./src/mail /mail/app COPY ./src/mail /mail/app
@@ -83,7 +83,7 @@ RUN yarn install --frozen-lockfile && \
# ---- static link collector ---- # ---- static link collector ----
FROM base as link-collector FROM base AS link-collector
ARG PEOPLE_STATIC_ROOT=/data/static ARG PEOPLE_STATIC_ROOT=/data/static
# Install libpangocairo & rdfind # Install libpangocairo & rdfind
@@ -108,7 +108,7 @@ RUN DJANGO_CONFIGURATION=Build DJANGO_JWT_PRIVATE_SIGNING_KEY=Dummy \
RUN rdfind -makesymlinks true -followsymlinks true -makeresultsfile false ${PEOPLE_STATIC_ROOT} RUN rdfind -makesymlinks true -followsymlinks true -makeresultsfile false ${PEOPLE_STATIC_ROOT}
# ---- Core application image ---- # ---- Core application image ----
FROM base as core FROM base AS core
ENV PYTHONUNBUFFERED=1 ENV PYTHONUNBUFFERED=1
@@ -143,7 +143,7 @@ WORKDIR /app
ENTRYPOINT [ "/usr/local/bin/entrypoint" ] ENTRYPOINT [ "/usr/local/bin/entrypoint" ]
# ---- Development image ---- # ---- Development image ----
FROM core as backend-development FROM core AS backend-development
# Switch back to the root user to install development dependencies # Switch back to the root user to install development dependencies
USER root:root USER root:root
@@ -169,7 +169,7 @@ ENV DB_HOST=postgresql \
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
# ---- Production image ---- # ---- Production image ----
FROM core as backend-production FROM core AS backend-production
ARG PEOPLE_STATIC_ROOT=/data/static ARG PEOPLE_STATIC_ROOT=/data/static