1
0
Fork 0
mirror of https://github.com/docker/awesome-compose.git synced 2025-04-19 07:18:06 +02:00

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
FROM --platform=$BUILDPLATFORM python:3.7-alpine AS builder
FROM python:3.7-alpine
EXPOSE 8000
WORKDIR /app
COPY requirements.txt /app
@ -8,17 +8,3 @@ RUN pip3 install -r requirements.txt --no-cache-dir
COPY . /app
ENTRYPOINT ["python3"]
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:
web:
build:
context: app
target: builder
build: app
ports:
- '8000:8000'