-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
33 lines (25 loc) · 1.48 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
FROM p4lang/third-party:latest as builder
ARG CMAKE_BUILD_TYPE=RELEASE
# No questions asked during package installation.
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y --no-install-recommends build-essential ca-certificates python3 flex bison \
make cmake gcc git libgmp-dev libelf-dev zlib1g-dev libjansson-dev libboost-graph-dev libboost-iostreams1.71-dev \
libgc-dev libfl-dev pkg-config libcap-dev
COPY . /nikss
WORKDIR /nikss
RUN chmod u+x /nikss/scripts/docker-build.sh && /nikss/scripts/docker-build.sh
FROM ubuntu:20.04 as runtime
LABEL authors="Tomasz Osiński <[email protected]>, Jan Palimąka <[email protected]>"
RUN apt-get update
RUN apt-get install -y --no-install-recommends ca-certificates python3 libelf-dev iproute2 clang llvm gcc libboost-iostreams1.71-dev make libjansson4 curl iperf iputils-ping
COPY --from=builder /usr/local/bin/p4c-ebpf /usr/local/bin/p4c-ebpf
COPY --from=builder /usr/local/bin/p4c /usr/local/bin/p4c
COPY --from=builder /usr/local/bin/nikss-ctl /usr/local/bin/nikss-ctl
COPY --from=builder /usr/local/sbin/bpftool /usr/local/sbin/bpftool
COPY --from=builder /usr/local/include/ebpf_kernel.h /usr/local/include/ebpf_kernel.h
COPY --from=builder /usr/local/include/ebpf_common.h /usr/local/include/ebpf_common.h
COPY --from=builder /usr/local/include/psa.h /usr/local/include/psa.h
COPY --from=builder /usr/include/bpf /usr/include/bpf
COPY --from=builder /usr/local/share/p4c /usr/local/share/p4c
WORKDIR /nikss