-
Notifications
You must be signed in to change notification settings - Fork 0
/
Containerfile
26 lines (20 loc) · 909 Bytes
/
Containerfile
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
# To upgrade pip for the system we need to run this as root
RUN python3 -m pip install --no-cache-dir --upgrade pip
# Add user
RUN useradd --create-home --shell /bin/bash threatuser
USER threatuser
WORKDIR /home/threatuser
ENV PATH="${PATH}:/home/threatuser/.local/bin"
# Install the dependencies
COPY api_requirements.txt requirements.txt
#RUN python3 -m pip install --no-cache-dir -r requirements.txt --target .
RUN python3 -m pip install --no-cache-dir -r requirements.txt
# TODO Install threatware using pip
# Copy code
COPY --chown=threatuser . .
#ENV THREATWARE_CONFIG_REPO=http://gitlab.threatware.local:8080/threatuser/threatware-tryit-config
ENV THREATWARE_CONFIG_REPO=https://github.com/samadhicsec/threatware-config.git
ENV THREATWARE_CONFIG_REPO_BRANCH=tryit
ENV THREATWARE_CONFIG_DIR=/home/threatuser/.threatware
CMD ["fastapi", "run", "actions/api_main.py", "--port", "8080"]