Remove dev environments build steps from Django example

Signed-off-by: Wes Lord <weslord@fisgardlabs.com>
This commit is contained in:
Wes Lord 2024-12-21 13:32:50 -08:00
parent 18f59bdb09
commit 32aa54f462
2 changed files with 2 additions and 18 deletions

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.4 # syntax=docker/dockerfile:1.4
FROM --platform=$BUILDPLATFORM python:3.7-alpine AS builder FROM python:3.7-alpine
EXPOSE 8000 EXPOSE 8000
WORKDIR /app WORKDIR /app
COPY requirements.txt /app COPY requirements.txt /app
@ -8,17 +8,3 @@ RUN pip3 install -r requirements.txt --no-cache-dir
COPY . /app COPY . /app
ENTRYPOINT ["python3"] ENTRYPOINT ["python3"]
CMD ["manage.py", "runserver", "0.0.0.0:8000"] CMD ["manage.py", "runserver", "0.0.0.0:8000"]
FROM builder as dev-envs
RUN <<EOF
apk update
apk add git
EOF
RUN <<EOF
addgroup -S docker
adduser -S --shell /bin/bash --ingroup docker vscode
EOF
# install Docker tools (cli, buildx, compose)
COPY --from=gloursdocker/docker / /
CMD ["manage.py", "runserver", "0.0.0.0:8000"]

View File

@ -1,7 +1,5 @@
services: services:
web: web:
build: build: app
context: app
target: builder
ports: ports:
- '8000:8000' - '8000:8000'