forked from DeepSecurityHealthCheck/HealthCheckCore
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
37 lines (28 loc) · 1.26 KB
/
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
29
30
31
32
33
34
35
36
37
# Use an official Python runtime as a parent image
FROM python:3.8-slim-buster
# Copy the current directory contentshinto the container at /app
COPY . /dshc
# Set the working directory to /app
WORKDIR /dshc
RUN apt-get update && \
apt-get install -y \
gcc zip php-cli php-xml php-imagick php-pear php-dom php-opcache php-font-lib php-mbstring php-gd composer curl && \
apt-get install -y curl && curl --silent --location https://deb.nodesource.com/setup_10.x | bash - && \
apt-get install nodejs -y &&\
apt-get clean
# Setting enviroment Docker to work with data_packs
ARG DSHC_EXECUTED_URL=http://127.0.0.1
ARG DSHC_CRASH_URL=http://127.0.0.1
ENV ENV=DOCKER
ENV DSHC_EXECUTED_URL=$DSHC_EXECUTED_URL
ENV DSHC_CRASH_URL=$DSHC_CRASH_URL
# Install any needed packages specified in requirements.txt
RUN pip3 install --upgrade pip && \
pip3 install --trusted-host pypi.python.org -r requirements.txt && \
pip3 install ./vendor/SDK/ && \
cd ./report_templates/HTML_en && composer install && cd ../.. && \
cd ./report_templates/HTML_jp && composer install && cd ../.. && \
cd ./report_templates/tech_report/TechnicalReport/ && npm i && cd ../../../ &&\
chmod +x dshc.py
# Run app.py when the container launches
ENTRYPOINT ["python3", "dshc.py"]