-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #742 from weli-l/dev/kmesh_manage
modify dockerfile
- Loading branch information
Showing
3 changed files
with
20 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,21 @@ | ||
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 | ||
|
||
# Usage: | ||
# docker run -itd --privileged=true -v /etc/cni/net.d:/etc/cni/net.d -v /opt/cni/bin:/opt/cni/bin -v /mnt:/mnt -v /sys/fs/bpf:/sys/fs/bpf -v /lib/modules:/lib/modules --name kmesh kmesh:latest | ||
# | ||
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 build/docker/start_kmesh.sh /kmesh | ||
|
||
COPY out/*so* /usr/lib64/ | ||
COPY out/*.o /usr/share/oncn-mda/ | ||
COPY out/oncn-mda.conf /etc/oncn-mda/ | ||
COPY out/kmesh-daemon /usr/bin/ | ||
COPY out/kmesh-cni /usr/bin/ | ||
COPY out/mdacore /usr/bin/ | ||
COPY build/docker/start_kmesh.sh /kmesh | ||
COPY out/ko /kmesh |