2024-07-06 21:10:44 +00:00
|
|
|
# syntax=docker/dockerfile:1.4
|
2024-08-03 15:37:27 +00:00
|
|
|
FROM python:3-slim-bookworm AS builder
|
|
|
|
|
2024-08-04 12:44:20 +00:00
|
|
|
# Second line optional/debug/qol
|
|
|
|
RUN apt update && apt install -y \
|
|
|
|
libmariadb-dev gcc \
|
|
|
|
mariadb-client
|
|
|
|
|
2024-07-06 21:10:44 +00:00
|
|
|
|
|
|
|
WORKDIR /code
|
|
|
|
COPY requirements.txt /code
|
|
|
|
RUN target=/root/.cache/pip \
|
2024-08-05 05:00:07 +00:00
|
|
|
pip3 install --root-user-action=ignore -q -r requirements.txt
|
2024-07-06 21:10:44 +00:00
|
|
|
|
2024-08-02 05:21:07 +00:00
|
|
|
# Need to make this explicit as part of expansion, no migrations or venv
|
2024-07-06 21:10:44 +00:00
|
|
|
COPY . .
|
|
|
|
|
2024-08-03 18:45:37 +00:00
|
|
|
ENV FLASK_APP microblog.py
|
2024-07-06 21:10:44 +00:00
|
|
|
|
|
|
|
# This might be scary to leave on
|
|
|
|
#ENV FLASK_ENV development
|
|
|
|
|
|
|
|
ENV FLASK_RUN_PORT 8000
|
|
|
|
ENV FLASK_RUN_HOST 0.0.0.0
|
|
|
|
RUN flask --version
|
|
|
|
|
|
|
|
EXPOSE 8000
|
|
|
|
|
|
|
|
CMD ["flask", "run"]
|
|
|
|
|