-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.20.04
54 lines (42 loc) · 1.17 KB
/
Dockerfile.20.04
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
########################################
# Base image
########################################
FROM ubuntu:20.04 as base
SHELL ["/bin/bash", "-c"]
ENV PYTHONUNBUFFERED=1
ENV DEBIAN_FRONTEND="noninteractive"
WORKDIR /fuzzer
USER root
RUN apt update
RUN apt install -y --no-install-recommends git
COPY ./stub/packages/20.04/* /opt/packages/
RUN dpkg -i /opt/packages/*; \
apt install -y -f && \
rm -rf /opt/packages
COPY ./stub/get-pip.py ./
RUN python3.7 ./get-pip.py && \
rm get-pip.py
RUN python3.7 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
COPY requirements*.txt ./
RUN pip3 install -r requirements-prod.txt
########################################
# Release image
########################################
FROM ubuntu:20.04
SHELL ["/bin/bash", "-c"]
ENV PYTHONUNBUFFERED=1
ENV DEBIAN_FRONTEND="noninteractive"
WORKDIR /fuzzer
ARG ENVIRONMENT=dev
ENV ENVIRONMENT=$ENVIRONMENT
RUN apt update && apt install -y ca-certificates
COPY ./stub/packages/20.04/* /opt/packages/
RUN dpkg -i /opt/packages/*; \
apt install -y -f && \
rm -rf /opt/packages
COPY agent ./agent
COPY logging.yaml ./
COPY --from=base /opt/venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
CMD python3 -m agent