mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 02:51:55 +00:00
Simple build system for ocaml-based iptables
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
This commit is contained in:
parent
bf1a0e0011
commit
0c471bdc09
@ -75,6 +75,7 @@ COPY packages/9pmount-vsock/9pmount-vsock /sbin
|
||||
COPY packages/test/etc /etc
|
||||
COPY packages/test/mobytest /usr/bin
|
||||
COPY packages/sysctl/etc /etc
|
||||
COPY packages/iptables/iptables /usr/local/sbin/iptables
|
||||
|
||||
RUN \
|
||||
rc-update add swap boot && \
|
||||
|
@ -10,6 +10,7 @@ all:
|
||||
$(MAKE) -C llmnrd OS=linux
|
||||
$(MAKE) -C gummiboot OS=linux
|
||||
$(MAKE) -C 9pmount-vsock OS=linux
|
||||
$(MAKE) -C iptables OS=linux
|
||||
|
||||
arm:
|
||||
$(MAKE) -C transfused OS=linux ARCH=arm
|
||||
@ -33,3 +34,4 @@ clean:
|
||||
$(MAKE) -C llmnrd clean
|
||||
$(MAKE) -C gummiboot clean
|
||||
$(MAKE) -C 9pmount-vsock clean
|
||||
$(MAKE) -C iptables clean
|
||||
|
5
alpine/packages/iptables/Dockerfile
Normal file
5
alpine/packages/iptables/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
||||
FROM ocaml/opam:alpine
|
||||
WORKDIR /app
|
||||
ADD . /app
|
||||
RUN sudo chown -R opam /app
|
||||
RUN ocamlopt -o iptables main.ml
|
9
alpine/packages/iptables/Makefile
Normal file
9
alpine/packages/iptables/Makefile
Normal file
@ -0,0 +1,9 @@
|
||||
all: iptables
|
||||
|
||||
iptables: Dockerfile main.ml
|
||||
docker build -t iptables:build .
|
||||
docker run --rm iptables:build cat /app/iptables > iptables
|
||||
chmod 755 iptables
|
||||
|
||||
clean:
|
||||
docker images -q iptables:build | xargs docker rmi -f || true
|
2
alpine/packages/iptables/main.ml
Normal file
2
alpine/packages/iptables/main.ml
Normal file
@ -0,0 +1,2 @@
|
||||
let () =
|
||||
print_string "Hello world!\n";;
|
Loading…
Reference in New Issue
Block a user