From 372db49e9416699be3fe3767593775b1b5cb7685 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Sun, 3 Nov 2024 22:21:58 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8(docker)=20convert=20to=20uppercase?= =?UTF-8?q?=20'as'=20keyword?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Match 'FROM' casing, to remove a warning. --- Dockerfile | 14 +++++++------- src/frontend/Dockerfile | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4d367e7b..a9f66fa1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Django Meet # ---- 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 RUN python -m pip install --upgrade pip setuptools @@ -11,7 +11,7 @@ RUN apk update && \ apk upgrade # ---- Back-end builder image ---- -FROM base as back-builder +FROM base AS back-builder WORKDIR /builder @@ -23,7 +23,7 @@ RUN mkdir /install && \ # ---- mails ---- -FROM node:20 as mail-builder +FROM node:20 AS mail-builder COPY ./src/mail /mail/app @@ -34,7 +34,7 @@ RUN yarn install --frozen-lockfile && \ # ---- static link collector ---- -FROM base as link-collector +FROM base AS link-collector ARG MEET_STATIC_ROOT=/data/static RUN apk add \ @@ -58,7 +58,7 @@ RUN DJANGO_CONFIGURATION=Build DJANGO_JWT_PRIVATE_SIGNING_KEY=Dummy \ RUN rdfind -makesymlinks true -followsymlinks true -makeresultsfile false ${MEET_STATIC_ROOT} # ---- Core application image ---- -FROM base as core +FROM base AS core ENV PYTHONUNBUFFERED=1 @@ -93,7 +93,7 @@ WORKDIR /app ENTRYPOINT [ "/usr/local/bin/entrypoint" ] # ---- Development image ---- -FROM core as backend-development +FROM core AS backend-development # Switch back to the root user to install development dependencies USER root:root @@ -119,7 +119,7 @@ ENV DB_HOST=postgresql \ CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] # ---- Production image ---- -FROM core as backend-production +FROM core AS backend-production ARG MEET_STATIC_ROOT=/data/static diff --git a/src/frontend/Dockerfile b/src/frontend/Dockerfile index 8b0ede3c..406a2e5d 100644 --- a/src/frontend/Dockerfile +++ b/src/frontend/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20-alpine as frontend-deps +FROM node:20-alpine AS frontend-deps WORKDIR /home/frontend/ @@ -11,11 +11,11 @@ COPY .dockerignore ./.dockerignore COPY ./src/frontend/ . ### ---- Front-end builder image ---- -FROM frontend-deps as meet +FROM frontend-deps AS meet WORKDIR /home/frontend -FROM frontend-deps as meet-dev +FROM frontend-deps AS meet-dev WORKDIR /home/frontend @@ -25,14 +25,14 @@ CMD [ "npm", "run", "dev"] # Tilt will rebuild Meet target so, we dissociate meet and meet-builder # to avoid rebuilding the app at every changes. -FROM meet as meet-builder +FROM meet AS meet-builder WORKDIR /home/frontend RUN npm run build # ---- 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 ARG DOCKER_USER