forked from bpfman/bpfman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Containerfile.bpfman.local
33 lines (23 loc) · 1.07 KB
/
Containerfile.bpfman.local
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
## This Containerfile makes use of docker's Buildkit to cache crates between
## builds, dramatically speeding up the local development process.
FROM rust:1 as bpfman-build
RUN apt-get update && apt-get install -y\
gcc-multilib\
libssl-dev
WORKDIR /usr/src/bpfman
COPY ./ /usr/src/bpfman
# Compile bpfman cli, bpfman-ns, and bpfman-rpc binaries
RUN --mount=type=cache,target=/usr/src/bpfman/target/ \
--mount=type=cache,target=/usr/local/cargo/registry \
cargo build --release
RUN --mount=type=cache,target=/usr/src/bpfman/target/ \
cp /usr/src/bpfman/target/release/bpfman ./bpfman/
RUN --mount=type=cache,target=/usr/src/bpfman/target/ \
cp /usr/src/bpfman/target/release/bpfman-ns ./bpfman/
RUN --mount=type=cache,target=/usr/src/bpfman/target/ \
cp /usr/src/bpfman/target/release/bpfman-rpc ./bpfman/
## Image for Local testing is much more of a debug image, give it bpftool and tcpdump
FROM fedora:39
RUN dnf makecache --refresh && dnf -y install bpftool tcpdump
COPY --from=bpfman-build ./usr/src/bpfman/bpfman .
ENTRYPOINT ["./bpfman-rpc", "--timeout=0"]