Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix github action arm image built #948

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/workflows/release-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,15 @@ jobs:

- name: Checkout code
uses: actions/checkout@v3

- name: Build
run: |
./kmesh_compile.sh

- name: Push by digest
- name: Build and Push by digest
id: build
uses: docker/build-push-action@v6
with:
context: .
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
file: build/docker/dockerfile
file: build/docker/github.dockerfile
tags: ${{ steps.meta.outputs.tags }}
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},name-canonical=true,push=true

Expand Down
26 changes: 26 additions & 0 deletions build/docker/github.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM ghcr.io/kmesh-net/kmesh-build:latest AS builder
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why need a new dockerfile?Why not modify the original dockerfile?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a temparary fix. Becase that @weli-l found before #742, it failed to build using docker 18.09

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

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 build/docker/start_kmesh.sh /kmesh
Loading