-
Notifications
You must be signed in to change notification settings - Fork 97
/
Copy pathgithub.dockerfile
27 lines (26 loc) · 1.19 KB
/
github.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
FROM ghcr.io/kmesh-net/kmesh-build:latest AS builder
COPY . /kmesh
WORKDIR /kmesh
RUN ./build.sh && ./build.sh -i
# Copy the kmesh.ko to /kmesh
RUN if [ -f /lib/modules/kmesh/kmesh.ko ]; then cp /lib/modules/kmesh/kmesh.ko /kmesh; fi
FROM openeuler/openeuler:23.09
WORKDIR /kmesh
RUN \
--mount=type=cache,target=/var/cache/dnf \
yum install -y kmod util-linux iptables && \
mkdir -p /usr/share/oncn-mda && \
mkdir -p /etc/oncn-mda
COPY --from=builder /usr/lib64/libbpf.so* /usr/lib64/
COPY --from=builder /usr/lib64/libprotobuf-c.so* /usr/lib64/
COPY --from=builder /usr/lib64/libkmesh_api_v2_c.so /usr/lib64/
COPY --from=builder /usr/lib64/libkmesh_deserial.so /usr/lib64/
COPY --from=builder /usr/lib64/libboundscheck.so /usr/lib64/
COPY --from=builder /kmesh/*.ko /kmesh
COPY --from=builder /kmesh/oncn-mda/build/ebpf_src/CMakeFiles/sock_redirect.dir/sock_redirect.c.o /usr/share/oncn-mda/
COPY --from=builder /kmesh/oncn-mda/etc/oncn-mda.conf /usr/share/oncn-mda/
COPY --from=builder /usr/bin/kmesh-daemon /usr/bin/
COPY --from=builder /usr/bin/kmesh-cni /usr/bin/
COPY --from=builder /usr/bin/mdacore /usr/bin/
COPY --from=builder /usr/bin/kmeshctl /usr/bin/
COPY build/docker/start_kmesh.sh /kmesh