-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
Dockerfile
26 lines (21 loc) · 757 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 python:3.9.2-alpine3.13 as build
WORKDIR /wheels
RUN apk add --no-cache \
ncurses-dev \
build-base
COPY docker_reqs.txt /opt/osintgram/requirements.txt
RUN pip3 wheel -r /opt/osintgram/requirements.txt
FROM python:3.9.2-alpine3.13
WORKDIR /home/osintgram
RUN adduser -D osintgram
COPY --from=build /wheels /wheels
COPY --chown=osintgram:osintgram requirements.txt /home/osintgram/
RUN pip3 install -r requirements.txt -f /wheels \
&& rm -rf /wheels \
&& rm -rf /root/.cache/pip/* \
&& rm requirements.txt
COPY --chown=osintgram:osintgram src/ /home/osintgram/src
COPY --chown=osintgram:osintgram main.py /home/osintgram/
COPY --chown=osintgram:osintgram config/ /home/osintgram/config
USER osintgram
ENTRYPOINT ["python", "main.py"]