Browse Source

amazon-2016.03 docker image

Adam Ierymenko 9 years ago
parent
commit
56fb08621e

+ 13 - 0
linux-build-farm/amazon-2016.03/x64/Dockerfile

@@ -0,0 +1,13 @@
+#FROM ambakshi/amazon-linux:2016.03
+#MAINTAINER Adam Ierymenko <[email protected]>
+
+#RUN yum update -y
+#RUN yum install -y epel-release
+#RUN yum install -y make development-tools rpmdevtools clang gcc-c++ ruby ruby-devel
+
+#RUN gem install ronn
+
+FROM zerotier/zt1-build-amazon-2016.03-x64-base
+MAINTAINER Adam Ierymenko <[email protected]>
+
+ADD zt1-src.tar.gz /

+ 26 - 14
linux-build-farm/build.sh

@@ -27,28 +27,40 @@ for distro in $subdirs; do
 
 	cd $distro
 
-	cd x64
-	mv ../../zt1-src.tar.gz .
-	docker build -t zt1-build-${distro}-x64 .
-	mv zt1-src.tar.gz ../..
-	cd ..
+	if [ -d x64 ]; then
+		cd x64
+		mv ../../zt1-src.tar.gz .
+		docker build -t zt1-build-${distro}-x64 .
+		mv zt1-src.tar.gz ../..
+		cd ..
+	fi
 
-	cd x86
-	mv ../../zt1-src.tar.gz .
-	docker build -t zt1-build-${distro}-x86 .
-	mv zt1-src.tar.gz ../..
-	cd ..
+	if [ -d x86 ]; then
+		cd x86
+		mv ../../zt1-src.tar.gz .
+		docker build -t zt1-build-${distro}-x86 .
+		mv zt1-src.tar.gz ../..
+		cd ..
+	fi
 
 	rm -f *.deb *.rpm
 
 #	exit 0
 
 	if [ ! -n "`echo $distro | grep -F debian`" -a ! -n "`echo $distro | grep -F ubuntu`" ]; then
-		docker run --rm -v `pwd`:/artifacts --privileged -it zt1-build-${distro}-x64 /bin/bash -c 'cd /ZeroTierOne ; make redhat ; cd .. ; cp `find /root/rpmbuild -type f -name *.rpm` /artifacts ; ls -l /artifacts'
-		docker run --rm -v `pwd`:/artifacts --privileged -it zt1-build-${distro}-x86 /bin/bash -c 'cd /ZeroTierOne ; make redhat ; cd .. ; cp `find /root/rpmbuild -type f -name *.rpm` /artifacts ; ls -l /artifacts'
+		if [ -d x64 ]; then
+			docker run --rm -v `pwd`:/artifacts --privileged -it zt1-build-${distro}-x64 /bin/bash -c 'cd /ZeroTierOne ; make redhat ; cd .. ; cp `find /root/rpmbuild -type f -name *.rpm` /artifacts ; ls -l /artifacts'
+		fi
+		if [ -d x86 ]; then
+			docker run --rm -v `pwd`:/artifacts --privileged -it zt1-build-${distro}-x86 /bin/bash -c 'cd /ZeroTierOne ; make redhat ; cd .. ; cp `find /root/rpmbuild -type f -name *.rpm` /artifacts ; ls -l /artifacts'
+		fi
 	else
-		docker run --rm -v `pwd`:/artifacts --privileged -it zt1-build-${distro}-x64 /bin/bash -c 'cd /ZeroTierOne ; make debian ; cd .. ; cp *.deb /artifacts ; ls -l /artifacts'
-		docker run --rm -v `pwd`:/artifacts --privileged -it zt1-build-${distro}-x86 /bin/bash -c 'cd /ZeroTierOne ; make debian ; cd .. ; cp *.deb /artifacts ; ls -l /artifacts'
+		if [ -d x64 ]; then
+			docker run --rm -v `pwd`:/artifacts --privileged -it zt1-build-${distro}-x64 /bin/bash -c 'cd /ZeroTierOne ; make debian ; cd .. ; cp *.deb /artifacts ; ls -l /artifacts'
+		fi
+		if [ -d x86 ]; then
+			docker run --rm -v `pwd`:/artifacts --privileged -it zt1-build-${distro}-x86 /bin/bash -c 'cd /ZeroTierOne ; make debian ; cd .. ; cp *.deb /artifacts ; ls -l /artifacts'
+		fi
 	fi
 
 	cd ..

+ 10 - 7
linux-build-farm/fedora-22/x86/Dockerfile

@@ -1,11 +1,14 @@
-FROM nickcis/fedora-32:22
-MAINTAINER Adam Ierymenko <[email protected]>
+#FROM nickcis/fedora-32:22
+#MAINTAINER Adam Ierymenko <[email protected]>
+
+#RUN mkdir -p /etc/dnf/vars
+#RUN echo 'i386' >/etc/dnf/vars/basearch
+#RUN echo 'i386' >/etc/dnf/vars/arch
 
-RUN mkdir -p /etc/dnf/vars
-RUN echo 'i386' >/etc/dnf/vars/basearch
-RUN echo 'i386' >/etc/dnf/vars/arch
+#RUN yum update -y
+#RUN yum install -y make rpmdevtools gcc-c++ rubygem-ronn json-parser-devel lz4-devel http-parser-devel libnatpmp-devel
 
-RUN yum update -y
-RUN yum install -y make rpmdevtools gcc-c++ rubygem-ronn json-parser-devel lz4-devel http-parser-devel libnatpmp-devel
+FROM zerotier/zt1-build-fedora-22-x86-base
+MAINTAINER Adam Ierymenko <[email protected]>
 
 ADD zt1-src.tar.gz /

+ 3 - 2
make-linux.mk

@@ -140,11 +140,12 @@ doc:	manpages
 
 clean: FORCE
 	rm -rf *.so *.o node/*.o controller/*.o osdep/*.o service/*.o ext/http-parser/*.o ext/lz4/*.o ext/json-parser/*.o ext/miniupnpc/*.o ext/libnatpmp/*.o $(OBJS) zerotier-one zerotier-idtool zerotier-cli zerotier-selftest build-* ZeroTierOneInstaller-* *.deb *.rpm .depend doc/*.1 doc/*.2 doc/*.8 debian/files debian/zerotier-one*.debhelper debian/zerotier-one.substvars debian/*.log debian/zerotier-one
-	find linux-build-farm -type f -name '*.deb' -print0 | xargs -0 rm -fv
-	find linux-build-farm -type f -name '*.rpm' -print0 | xargs -0 rm -fv
 
 distclean:	clean
 	rm -rf doc/node_modules
+	find linux-build-farm -type f -name '*.deb' -print0 | xargs -0 rm -fv
+	find linux-build-farm -type f -name '*.rpm' -print0 | xargs -0 rm -fv
+	find linux-build-farm -type f -name 'zt1-src.tar.gz' | xargs rm -fv
 
 realclean:	distclean