-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (22 loc) · 848 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
27
28
FROM python:3.10-slim
LABEL Name=transforms Version=0.0.1
# Install necessary packages, create user and group
RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get upgrade -y \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& groupadd -r maltego \
&& useradd -r -g maltego maltego
WORKDIR /home/osint/transforms
# Copy project files
COPY . .
# Install requirements and additional packages
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade -r requirements.txt gunicorn gevent \
&& chown -R maltego:maltego /home/osint/transforms
USER maltego
EXPOSE 8080
ENTRYPOINT ["gunicorn"]
# For SSL, add "--bind=0.0.0.0:8443 --certfile=server.crt --keyfile=server.key"
CMD ["--bind=0.0.0.0:8080", "--workers", "3", "-k", "gevent", "project:application"]