mirror of
https://github.com/docker/awesome-compose.git
synced 2025-06-30 17:42:55 +00:00
Merge 0455c96eec
into 18f59bdb09
This commit is contained in:
commit
ca15a5bf8c
@ -1,27 +1,12 @@
|
|||||||
# syntax=docker/dockerfile:1.4
|
FROM python:3.10-alpine
|
||||||
FROM --platform=$BUILDPLATFORM python:3.10-alpine AS builder
|
|
||||||
|
|
||||||
WORKDIR /code
|
WORKDIR /code
|
||||||
|
|
||||||
COPY requirements.txt /code
|
COPY requirements.txt /code
|
||||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
RUN pip3 install -r requirements.txt
|
||||||
pip3 install -r requirements.txt
|
|
||||||
|
|
||||||
COPY . /code
|
COPY . /code
|
||||||
|
|
||||||
ENTRYPOINT ["python3"]
|
EXPOSE 5000
|
||||||
CMD ["app.py"]
|
|
||||||
|
|
||||||
FROM builder as dev-envs
|
CMD ["python", "app.py"]
|
||||||
|
|
||||||
RUN <<EOF
|
|
||||||
apk update
|
|
||||||
apk add git bash
|
|
||||||
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 / /
|
|
||||||
|
@ -11,4 +11,4 @@ def hello():
|
|||||||
return "This webpage has been viewed "+counter+" time(s)"
|
return "This webpage has been viewed "+counter+" time(s)"
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app.run(host="0.0.0.0", port=8000, debug=True)
|
app.run(host="0.0.0.0", port=5000, debug=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user