Merge pull request #2747 from ebeigarts/update-herokuish-base-image

Update herokuish base image on updates using --pull
This commit is contained in:
Jose Diaz-Gonzalez
2017-04-27 15:36:58 -06:00
committed by GitHub
2 changed files with 2 additions and 13 deletions

7
deb.mk
View File

@@ -86,16 +86,11 @@ deb-herokuish:
@echo "-> Creating deb files"
@echo "#!/usr/bin/env bash" >> /tmp/tmp/post-install
@echo "sleep 5" >> /tmp/tmp/post-install
@echo "count=\`sudo docker images | grep gliderlabs/herokuish | wc -l\`" >> /tmp/tmp/post-install
@echo 'if [ "$$count" -ne 0 ]; then' >> /tmp/tmp/post-install
@echo " echo 'Removing old herokuish image'" >> /tmp/tmp/post-install
@echo " sudo docker rmi gliderlabs/herokuish" >> /tmp/tmp/post-install
@echo "fi" >> /tmp/tmp/post-install
@echo "echo 'Importing herokuish into docker (around 5 minutes)'" >> /tmp/tmp/post-install
@echo 'if [[ ! -z $${http_proxy+x} ]]; then BUILDARGS="--build-arg http_proxy=$$http_proxy"; fi' >> /tmp/tmp/post-install
@echo 'if [[ ! -z $${https_proxy+x} ]]; then BUILDARGS="$$BUILDARGS --build-arg https_proxy=$$https_proxy"; fi' >> /tmp/tmp/post-install
@echo 'if [[ ! -z $${BUILDARGS+x} ]]; then echo Adding proxy settings to docker build: $$BUILDARGS; fi' >> /tmp/tmp/post-install
@echo 'sudo docker build $$BUILDARGS -t gliderlabs/herokuish /var/lib/herokuish 1> /dev/null' >> /tmp/tmp/post-install
@echo 'sudo docker build --pull $$BUILDARGS -t gliderlabs/herokuish /var/lib/herokuish 1> /dev/null' >> /tmp/tmp/post-install
@echo "-> Cloning repository"
git clone -q "https://github.com/$(HEROKUISH_REPO_NAME).git" --branch "v$(HEROKUISH_VERSION)" /tmp/tmp/herokuish > /dev/null

View File

@@ -7,14 +7,8 @@ main() {
sleep 5
count=$(sudo docker images | grep -c gliderlabs/herokuish)
if [ "$count" -ne 0 ]; then
echo 'Removing old herokuish image'
sudo docker rmi gliderlabs/herokuish
fi
echo 'Importing herokuish into docker (around 5 minutes)'
sudo docker build -t gliderlabs/herokuish /var/lib/herokuish 1> /dev/null
sudo docker build --pull -t gliderlabs/herokuish /var/lib/herokuish 1> /dev/null
}
main