From 077b7cee6e017d1d4e2893638745f6a724cd0fc2 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 19 Mar 2015 20:04:48 -0400 Subject: [PATCH 1/4] Set dokku version during post installation --- debian/postinst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/postinst b/debian/postinst index 25965e1dd..231c1a20d 100755 --- a/debian/postinst +++ b/debian/postinst @@ -13,6 +13,8 @@ case "$1" in egrep -i "^docker" /etc/group || groupadd docker usermod -aG docker dokku dokku plugins-install + rm -f /home/dokku/VERSION + cp /var/lib/dokku/STABLE_VERSION /home/dokku/VERSION if [ -f /etc/init/dokku-installer.conf ] && service dokku-installer status 2> /dev/null | grep waiting; then sudo service dokku-installer start From 6f52853049799dd30cd214f96ec9a22afd4fbd2a Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 19 Mar 2015 20:05:25 -0400 Subject: [PATCH 2/4] Ensure we always have apt-transport-https available On certain distributions, this package is not automatically installed --- deb.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deb.mk b/deb.mk index 6e3f5917d..068969520 100644 --- a/deb.mk +++ b/deb.mk @@ -29,6 +29,10 @@ GOPATH = /home/vagrant/gocode .PHONY: install-from-deb deb-all deb-buildstep deb-dokku deb-gems deb-pluginhook deb-setup deb-sshcommand install-from-deb: + echo "--> Initial apt-get update" + sudo apt-get update > /dev/null + sudo apt-get install -y apt-transport-https + echo "--> Installing docker gpg key" curl --silent https://get.docker.io/gpg 2> /dev/null | apt-key add - 2>&1 >/dev/null @@ -43,7 +47,7 @@ install-from-deb: sudo apt-get update > /dev/null echo "--> Installing pre-requisites" - sudo apt-get install -y linux-image-extra-`uname -r` apt-transport-https + sudo apt-get install -y linux-image-extra-`uname -r` echo "--> Installing dokku" sudo apt-get install -y dokku From aee8ada6d086d093fe49ccb05cfbcdfc3caf8954 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 19 Mar 2015 20:07:32 -0400 Subject: [PATCH 3/4] Copy the public key into place instead of moving it This gets around reprovisioning issues --- Vagrantfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index a2a4e7d9c..ba7b7352a 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -53,6 +53,6 @@ Vagrant::configure("2") do |config| if Pathname.new(PUBLIC_KEY_PATH).exist? config.vm.provision :file, source: PUBLIC_KEY_PATH, destination: '/tmp/id_rsa.pub' - config.vm.provision :shell, :inline => "rm /root/.ssh/authorized_keys && mv /tmp/id_rsa.pub /root/.ssh/authorized_keys" + config.vm.provision :shell, :inline => "rm -f /root/.ssh/authorized_keys && cp /tmp/id_rsa.pub /root/.ssh/authorized_keys" end end From 95ae41b2fd2986b26c34aa257b75398af359159f Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 19 Mar 2015 21:08:31 -0400 Subject: [PATCH 4/4] Switch all gpg key retrieval to use docker.com --- Makefile | 2 +- contrib/stackscript.sh | 2 +- deb.mk | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0083ae5d3..5497eb032 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ docker: aufs apt-get install -qq -y curl egrep -i "^docker" /etc/group || groupadd docker usermod -aG docker dokku - curl --silent https://get.docker.io/gpg | apt-key add - + curl --silent https://get.docker.com/gpg | apt-key add - echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list apt-get update ifdef DOCKER_VERSION diff --git a/contrib/stackscript.sh b/contrib/stackscript.sh index 7650176b2..4d9ace16b 100644 --- a/contrib/stackscript.sh +++ b/contrib/stackscript.sh @@ -137,7 +137,7 @@ function install_prerequisites { sudo apt-get install -qq -y curl > /dev/null 2>&1 logit "Installing docker gpg key" - curl --silent https://get.docker.io/gpg 2> /dev/null | apt-key add - > /dev/null 2>&1 + curl --silent https://get.docker.com/gpg 2> /dev/null | apt-key add - > /dev/null 2>&1 logit "Installing dokku gpg key" curl --silent https://packagecloud.io/gpg.key 2> /dev/null | apt-key add - > /dev/null 2>&1 diff --git a/deb.mk b/deb.mk index 068969520..c10fdb89f 100644 --- a/deb.mk +++ b/deb.mk @@ -34,7 +34,7 @@ install-from-deb: sudo apt-get install -y apt-transport-https echo "--> Installing docker gpg key" - curl --silent https://get.docker.io/gpg 2> /dev/null | apt-key add - 2>&1 >/dev/null + curl --silent https://get.docker.com/gpg 2> /dev/null | apt-key add - 2>&1 >/dev/null echo "--> Installing dokku gpg key" curl --silent https://packagecloud.io/gpg.key 2> /dev/null | apt-key add - 2>&1 >/dev/null