-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
3 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,8 @@ | ||
# syntax=docker/dockerfile:1.4 | ||
|
||
FROM --platform=$BUILDPLATFORM python:3.7-alpine AS builder | ||
EXPOSE 8000 | ||
FROM python:3.7-alpine AS builder | ||
EXPOSE 8080 | ||
WORKDIR /app | ||
COPY requirements.txt /app | ||
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:8080"] |