-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 788 Bytes
/
Dockerfile
File metadata and controls
29 lines (22 loc) · 788 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
# begin with the base Alpine python image
FROM python:3.14.5-alpine3.23
# create a directory to store the application
WORKDIR /usr/local/ns-assembly
# update alpine packages
RUN apk update && apk upgrade
# download a signal handler
RUN wget -q -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_x86_64 \
&& chmod +x /usr/local/bin/dumb-init
# copy requirements file
COPY requirements.txt ./
# install required dependencies
RUN pip install --no-cache-dir -r requirements.txt
# copy the source code
COPY src ./src
# make sure logs are unbuffered
ENV PYTHON_UNBUFFERED=1
# send a KeyboardInterrupt instead of SIGTERM
STOPSIGNAL SIGINT
# run source code
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
CMD ["python", "./src/"]