Skip to content

Commit

Permalink
🎨(docker) convert to uppercase 'as' keyword
Browse files Browse the repository at this point in the history
Match 'FROM' casing, to remove a warning.
  • Loading branch information
lebaudantoine committed Nov 3, 2024
1 parent f7ed70d commit 372db49
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand All @@ -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

Expand All @@ -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 \
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down
10 changes: 5 additions & 5 deletions src/frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20-alpine as frontend-deps
FROM node:20-alpine AS frontend-deps

WORKDIR /home/frontend/

Expand All @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 372db49

Please sign in to comment.