From 56fb08621ec16e9798ad1df681ccf686220841b4 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 29 Jun 2016 14:35:53 -0700 Subject: [PATCH] amazon-2016.03 docker image --- .../amazon-2016.03/x64/Dockerfile | 13 ++++++ linux-build-farm/build.sh | 40 ++++++++++++------- linux-build-farm/fedora-22/x86/Dockerfile | 19 +++++---- make-linux.mk | 5 ++- 4 files changed, 53 insertions(+), 24 deletions(-) create mode 100644 linux-build-farm/amazon-2016.03/x64/Dockerfile diff --git a/linux-build-farm/amazon-2016.03/x64/Dockerfile b/linux-build-farm/amazon-2016.03/x64/Dockerfile new file mode 100644 index 000000000..bd1a246ae --- /dev/null +++ b/linux-build-farm/amazon-2016.03/x64/Dockerfile @@ -0,0 +1,13 @@ +#FROM ambakshi/amazon-linux:2016.03 +#MAINTAINER Adam Ierymenko + +#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 + +ADD zt1-src.tar.gz / diff --git a/linux-build-farm/build.sh b/linux-build-farm/build.sh index 468386ce2..0eb7c5d26 100755 --- a/linux-build-farm/build.sh +++ b/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 .. diff --git a/linux-build-farm/fedora-22/x86/Dockerfile b/linux-build-farm/fedora-22/x86/Dockerfile index e4b546b4f..504645c22 100644 --- a/linux-build-farm/fedora-22/x86/Dockerfile +++ b/linux-build-farm/fedora-22/x86/Dockerfile @@ -1,11 +1,14 @@ -FROM nickcis/fedora-32:22 +#FROM nickcis/fedora-32:22 +#MAINTAINER Adam Ierymenko + +#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 + +FROM zerotier/zt1-build-fedora-22-x86-base MAINTAINER Adam Ierymenko -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 - ADD zt1-src.tar.gz / diff --git a/make-linux.mk b/make-linux.mk index a2e9e8025..13b154763 100644 --- a/make-linux.mk +++ b/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