clean up nc-vsock build

Signed-off-by: Justin Cormack <justin@specialbusservice.com>
This commit is contained in:
Justin Cormack 2016-09-10 19:56:16 +01:00 committed by Justin Cormack
parent d4c09bbd92
commit b06a5fa6eb
3 changed files with 9 additions and 15 deletions

View File

@ -5,7 +5,7 @@ all:
$(MAKE) -C tap-vsockd
$(MAKE) -C hvtools
$(MAKE) -C docker
$(MAKE) -C nc-vsock OS=linux
$(MAKE) -C nc-vsock
$(MAKE) -C vsudd
$(MAKE) -C 9pmount-vsock
$(MAKE) -C iptables

View File

@ -1,8 +1,9 @@
FROM mobylinux/alpine-build-c:1b53976210ba819823eda5b1d0d3ea337772e97b
RUN mkdir -p /nc-vsock
WORKDIR /nc-vsock
COPY . /nc-vsock
RUN make nc-vsock
WORKDIR /nc-vsock
RUN cc -Wall -Werror -o nc-vsock nc-vsock.c -luuid
CMD ["tar", "cf", "-", "nc-vsock"]

View File

@ -1,15 +1,8 @@
.PHONY: all
DEPS=nc-vsock.c
all: Dockerfile $(DEPS)
docker build -t nc-vsock:build .
docker run --rm nc-vsock:build cat nc-vsock > nc-vsock
chmod 755 nc-vsock
DEPS=Dockerfile $(wildcard *.c *.h)
nc-vsock: $(DEPS)
gcc -Wall -Werror -o nc-vsock nc-vsock.c -luuid
tar cf - $(DEPS) | docker build -t nc-vsock:build -
docker run --rm --net=none nc-vsock:build | tar xf -
clean:
rm -f nc-vsock
docker images -q nc-vsock:build | xargs docker rmi -f || true