From e9e73dea57eb126e1081f269071402381129545a Mon Sep 17 00:00:00 2001 From: EC2 Default User Date: Sun, 1 Jul 2018 09:09:49 +0000 Subject: add Dockerfile and Makefile --- Makefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..cd9c983 --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +.DEFAULT_GOAL := default + +all: x86-64 i386 +default: x86-64 +x86-64: x86-64.build +i386: i386.build +%.build: src/pamldapd.go + @echo BUILD ARCH $(shell basename $@ .build) + docker build -t pamldapd-build-$(shell basename $@ .build)-tmp -f Dockerfile_$(shell basename $@ .build) . + docker run --name pamldapd-build-$(shell basename $@ .build)-tmp pamldapd-build-$(shell basename $@ .build)-tmp + docker wait pamldapd-build-$(shell basename $@ .build)-tmp + docker cp pamldapd-build-$(shell basename $@ .build)-tmp:/root/go/src/pamldapd pamldapd-$(shell basename $@ .build) + docker rm pamldapd-build-$(shell basename $@ .build)-tmp + +clean: x86-64.clean i386.clean +%.clean: + @echo CLEAN ARCH $(shell basename $@ .build) + docker rmi pamldapd-build-$(shell basename $@ .build)-tmp || true -- cgit v1.2.3