diff --git a/DEB/Dockerfile b/DEB/Dockerfile index 89c80e3..9dc1dc8 100644 --- a/DEB/Dockerfile +++ b/DEB/Dockerfile @@ -4,6 +4,12 @@ RUN apt-get update && apt-get install -y \ build-essential fakeroot devscripts \ python-psycopg2 python-setuptools python-dev libyaml-dev \ python3-virtualenv dh-virtualenv python3-psycopg2 \ - && rm -rf /var/lib/apt/lists/* + wget git ruby ruby-dev rubygems build-essential \ + curl \ + && rm -rf /var/lib/apt/lists/* \ + && gem install --no-ri --no-rdoc fpm \ + && cd /opt \ + && wget https://dl.google.com/go/go1.10.1.linux-amd64.tar.gz \ + && tar -xzf go1.10.1.linux-amd64.tar.gz CMD ["bash"] diff --git a/DEB/buildprocess.sh b/DEB/buildprocess.sh index 213c6da..759c0da 100755 --- a/DEB/buildprocess.sh +++ b/DEB/buildprocess.sh @@ -11,3 +11,12 @@ cp -r debian/ patroni-${PATRONI_VERSION} cd patroni-${PATRONI_VERSION} debuild -us -uc + +export PATH=/opt/go/bin:$PATH +mkdir -p /build-tmp/gopath +export GOPATH=/build-tmp/gopath +go get github.com/cybertec-postgresql/vip-manager +cd /build-tmp/gopath/src/github.com/cybertec-postgresql/vip-manager/ +make vip-manager +make package +cp vip-manager*.deb /debian-build/