-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 747 Bytes
/
Dockerfile
File metadata and controls
30 lines (22 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Base image: Lightweight Python image
FROM python:3.11-bookworm
ARG TARGETOS TARGETARCH
# Create a working directory for the app
WORKDIR /app
# Copy Pipfile and Pipfile.lock
COPY Pipfile Pipfile.lock /app/
# Install dependencies using pipenv
RUN pip install --upgrade pip wheel setuptools && \
pip install --no-warn-script-location pipenv && \
pipenv install --system --deploy --ignore-pipfile --extra-pip-args=--ignore-installed && \
rm -rf ~/.cache ~/.local
# Copy the entire application code
COPY . /app
# Expose port 9000 for Flask to listen on
EXPOSE 9000
ENV FLASK_APP=uma_vasp
ENV FLASK_RUN_PORT=9000
# log everything to stdout:
ENV PYTHONUNBUFFERED True
# Start the Flask app
CMD ["flask", "run", "--host", "0.0.0.0"]