-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
27 lines (20 loc) · 741 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
ARG branch=latest
FROM cccs/assemblyline-v4-service-base:$branch
ENV SERVICE_PATH urldownloader.urldownloader.URLDownloader
USER root
# Install Chrome for headless rendering of HTML documents
RUN apt update -y && apt install wget && \
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
apt install -y ./google-chrome-stable_current_amd64.deb && rm -f ./google-chrome-stable_current_amd64.deb
RUN pip install html2image
# Switch to assemblyline user
USER assemblyline
# Copy service code
WORKDIR /opt/al_service
COPY . .
# Patch version in manifest
ARG version=4.0.0.dev1
USER root
RUN sed -i -e "s/\$SERVICE_TAG/$version/g" service_manifest.yml
# Switch to assemblyline user
USER assemblyline