-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile.crashme
90 lines (65 loc) · 1.8 KB
/
Dockerfile.crashme
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
FROM golang:1.19-alpine AS build
WORKDIR /usr/src/app
RUN apk add --update \
curl \
gcc \
git \
make \
musl-dev \
file
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
RUN make crashme
RUN cp build/crashme /crashme
RUN ldd /crashme || true
RUN file /crashme
FROM ubuntu:20.04 AS base
RUN echo "Don't use cache #3" > /.force_full_rebuild
RUN apt-get update
RUN apt-get install -y wget gnupg
RUN apt-get update
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y \
build-essential \
cmake \
ccache \
ninja-build \
clang-tools-11 \
g++-10
RUN apt-get update
RUN apt-get install -y \
jq \
python3 \
python3-pip \
git
RUN pip3 install PyYAML \
pytz \
docopt \
requests \
cpplint \
numpy \
pytest
RUN apt-get install -y \
libpoco-dev \
libjsoncpp-dev \
libboost-dev \
libboost-context-dev \
libpng-dev \
libre2-dev
RUN apt-get install -y clang-format-11 clang-tidy-11
RUN apt-get install -y libjpeg-dev libfftw3-dev
FROM base AS cmake
RUN echo 'Do not use cache #2' >/dev/null
RUN mkdir -p /opt/hse
RUN git clone --depth=1 https://gitlab.com/danlark/cpp-advanced-hse.git /opt/hse/cpp-advanced-hse
RUN cmake -B /opt/hse/cpp-advanced-hse/build -S /opt/hse/cpp-advanced-hse -DCMAKE_BUILD_TYPE=Debug
RUN cmake --build /opt/hse/cpp-advanced-hse/build --parallel --target build-ctf
RUN mkdir -p /build && mv /opt/hse/cpp-advanced-hse/build/ctf_* /build/
FROM ubuntu:20.04
RUN apt update
RUN apt install -y ca-certificates libasan5
COPY --from=cmake /build /build
COPY --from=build /crashme /
ENTRYPOINT ["/crashme"]
CMD ["-address", ":9090", "-build", "/build", "-submits", "/var/run/crashme/submits"]