mirror of
https://github.com/docker/awesome-compose.git
synced 2025-04-19 07:18:06 +02:00
Initial commit for flask-redis
This commit is contained in:
parent
18f59bdb09
commit
0455c96eec
2 changed files with 5 additions and 20 deletions
|
@ -1,27 +1,12 @@
|
|||
# syntax=docker/dockerfile:1.4
|
||||
FROM --platform=$BUILDPLATFORM python:3.10-alpine AS builder
|
||||
FROM python:3.10-alpine
|
||||
|
||||
WORKDIR /code
|
||||
|
||||
COPY requirements.txt /code
|
||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
pip3 install -r requirements.txt
|
||||
RUN pip3 install -r requirements.txt
|
||||
|
||||
COPY . /code
|
||||
|
||||
ENTRYPOINT ["python3"]
|
||||
CMD ["app.py"]
|
||||
EXPOSE 5000
|
||||
|
||||
FROM builder as dev-envs
|
||||
|
||||
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 / /
|
||||
CMD ["python", "app.py"]
|
||||
|
|
|
@ -11,4 +11,4 @@ def hello():
|
|||
return "This webpage has been viewed "+counter+" time(s)"
|
||||
|
||||
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…
Add table
Add a link
Reference in a new issue