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

support: use local compiled files to build docker image #263

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@ RUN rm -fr /root/loxilb-io/loxilb/.git
RUN rm -fr /root/loxilb-io/loxilb/.github
RUN mkdir -p /root/loxilb-io/loxilb/
RUN cp /usr/local/sbin/loxilb /root/loxilb-io/loxilb/loxilb
#RUN /usr/local/sbin/mkllb_bpffs

#RUN cd /root/loxilb-io/loxilb/ && make test

# Optional files, only apply when files exist
COPY ./loxilb.rep* /root/loxilb-io/loxilb/loxilb
TrekkieCoder marked this conversation as resolved.
Show resolved Hide resolved
COPY ./llb_ebpf_main.o.rep* /opt/loxilb/llb_ebpf_main.o
COPY ./llb_xdp_main.o.rep* /opt/loxilb/llb_xdp_main.o

ENTRYPOINT ["/root/loxilb-io/loxilb/loxilb"]

# Expose Ports
Expand Down
15 changes: 14 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,20 @@ docker-cp-ebpf: build
docker cp /opt/loxilb/llb_ebpf_main.o $(loxilbid):/opt/loxilb/llb_ebpf_main.o
docker cp /opt/loxilb/llb_xdp_main.o $(loxilbid):/opt/loxilb/llb_xdp_main.o

docker:
docker-rp: build
cp loxilb ./loxilb.rep
cp /opt/loxilb/llb_ebpf_main.o ./llb_ebpf_main.o.rep
cp /opt/loxilb/llb_xdp_main.o ./llb_xdp_main.o.rep
$(MAKE) docker
rm ./llb_ebpf_main.o.rep ./llb_xdp_main.o.rep ./loxilb.rep

docker-rp-ebpf: build
cp /opt/loxilb/llb_ebpf_main.o ./llb_ebpf_main.o.rep
cp /opt/loxilb/llb_xdp_main.o ./llb_xdp_main.o.rep
$(MAKE) docker
rm ./llb_ebpf_main.o.rep ./llb_xdp_main.o.rep

docker:
docker build -t ghcr.io/loxilb-io/loxilb:latest .

docker-arm64:
Expand Down