-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
26 lines (21 loc) · 791 Bytes
/
Dockerfile
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
FROM bitnami/python:3.10 as builder
# hadolint ignore=DL3008
RUN apt-get update \
&& apt-get install --no-install-recommends -y git
WORKDIR /home/app
COPY requirements.txt .
COPY dev-requirements.txt .
RUN pip install --no-cache-dir --requirement requirements.txt
# for get commit name when you call rawsec-cli -V
COPY .git .git
# for docs/requirements
COPY docs/ docs/
COPY rawsec_cli rawsec_cli
COPY setup.py .
COPY README.md .
ENV PYTHONPATH=${PYTHONPATH}:/home/app/rawsec_cli:/home/app/rawsec_cli/cli
RUN python setup.py install
FROM bitnami/python:3.10
COPY --from=builder /opt/bitnami/python/lib/python3.10/site-packages /opt/bitnami/python/lib/python3.10/site-packages
COPY --from=builder /opt/bitnami/python/bin/rawsec-cli /opt/bitnami/python/bin/rawsec-cli
CMD ["rawsec-cli"]