-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (18 loc) · 703 Bytes
/
Copy pathDockerfile
File metadata and controls
26 lines (18 loc) · 703 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
# Dockerfile
# inherit from this "empty base image", see https://hub.docker.com/_/python/
FROM python:3.14-alpine
# take some responsibility for this container
LABEL org.opencontainers.image.authors="Aarno Aukia <aarno.aukia@vshn.ch>"
# directory to install the app inside the container
WORKDIR /usr/src/app
# install python dependencies, this will be cached if the requirements.txt file does not change
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# copy application source code into container
COPY app.py .
# drop root privileges when running the application
USER 1001
# run this command at run-time
CMD [ "python", "app.py" ]
# expose this TCP-port
EXPOSE 8080