-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (29 loc) · 1.02 KB
/
Dockerfile
File metadata and controls
42 lines (29 loc) · 1.02 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
FROM python:3.14.2-alpine AS python-builder
# Copy local code to the container image.
ENV PYTHONUNBUFFERED 1
ENV PYTHONWARNINGS ignore
WORKDIR /working/install
RUN apk add --no-cache \
python3 \
py3-pip \
py3-setuptools \
py3-wheel \
build-base \
python3-dev
COPY requirements.txt /requirements.txt
# Install python requirements to /working/install directory for cleaner copy
RUN pip3 install --prefix=/working/install -r /requirements.txt
#===============================================================================================
#===============================================================================================
FROM python:3.14.2-alpine
# Copy local code to the container image.
ENV PYTHONWARNINGS ignore
ENV PYTHONUNBUFFERED 1
WORKDIR /web-processor
# Copy installed python modules
COPY --from=python-builder /working/install/lib /usr/local/lib
COPY service.py web_processor_cli.py ./
COPY web_processor ./web_processor
RUN adduser -D scanner
USER scanner
CMD ["python3", "service.py"]