-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (26 loc) · 762 Bytes
/
Copy pathDockerfile
File metadata and controls
33 lines (26 loc) · 762 Bytes
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
ARG branch=stable
FROM cccs/assemblyline-v4-service-base:$branch
ENV SERVICE_PATH core.service.WasmAnalyzer
# Install apt dependencies
USER root
COPY pkglist.txt /tmp/setup/
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
$(grep -vE "^\s*(#|$)" /tmp/setup/pkglist.txt | tr "\n" " ") && \
rm -rf /tmp/setup/pkglist.txt /var/lib/apt/lists/*
# Install python dependencies
USER assemblyline
COPY requirements.txt requirements.txt
RUN pip install \
--no-cache-dir \
--user \
--requirement requirements.txt && \
rm -rf ~/.cache/pip
# Copy service code
WORKDIR /opt/al_service
COPY . .
# Fix ownership
USER root
RUN chown -R assemblyline:assemblyline /opt/al_service
USER assemblyline