Skip to content

Commit

Permalink
🎨(dockerfile) fix FromAsCasing warnings
Browse files Browse the repository at this point in the history
Warning where raised because of the casing change between
`FROM` and `as`.
  • Loading branch information
qbey committed Nov 15, 2024
1 parent 1b3e7e1 commit 04c282f
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Django People

# ---- 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

### ---- Front-end dependencies image ----
FROM node:20 as frontend-deps
FROM node:20 AS frontend-deps

WORKDIR /deps

Expand All @@ -24,7 +24,7 @@ COPY ./src/frontend/packages/eslint-config-people/package.json ./packages/eslint
RUN yarn --frozen-lockfile

### ---- Front-end builder dev image ----
FROM node:20 as frontend-builder-dev
FROM node:20 AS frontend-builder-dev

WORKDIR /builder

Expand All @@ -34,12 +34,12 @@ COPY ./src/frontend .
WORKDIR ./apps/desk

### ---- Front-end builder image ----
FROM frontend-builder-dev as frontend-builder
FROM frontend-builder-dev AS frontend-builder

RUN yarn 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 All @@ -60,7 +60,7 @@ CMD ["nginx", "-g", "daemon off;"]


# ---- Back-end builder image ----
FROM base as back-builder
FROM base AS back-builder

WORKDIR /builder

Expand All @@ -72,7 +72,7 @@ RUN mkdir /install && \


# ---- mails ----
FROM node:20 as mail-builder
FROM node:20 AS mail-builder

COPY ./src/mail /mail/app

Expand All @@ -83,7 +83,7 @@ RUN yarn install --frozen-lockfile && \


# ---- static link collector ----
FROM base as link-collector
FROM base AS link-collector
ARG PEOPLE_STATIC_ROOT=/data/static

# Install libpangocairo & rdfind
Expand All @@ -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}

# ---- Core application image ----
FROM base as core
FROM base AS core

ENV PYTHONUNBUFFERED=1

Expand Down Expand Up @@ -143,7 +143,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 @@ -169,7 +169,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 PEOPLE_STATIC_ROOT=/data/static

Expand Down

0 comments on commit 04c282f

Please sign in to comment.