feat: pull herokuish from docker hub

This removes the ability to support http proxy directly, but fixes issues where users may not
be using exactly the same herokuish as we expect.

Closes #2828

[ci skip]
This commit is contained in:
Jose Diaz-Gonzalez committed 2018-03-06 07:15:49 -05:00
1 parent 7a0f527336
commit 8844c2ab67
3 files changed
+26 -36

No files matched your search

+15 -13
View File
@@ -93,21 +93,23 @@ deb-herokuish:
@echo "#!/usr/bin/env bash" >> /tmp/tmp/post-install @echo "#!/usr/bin/env bash" >> /tmp/tmp/post-install
@echo "sleep 5" >> /tmp/tmp/post-install @echo "sleep 5" >> /tmp/tmp/post-install
@echo "echo 'Importing herokuish into docker (around 5 minutes)'" >> /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 $${http_proxy+x} ]]; then echo "See the docker pull docs for proxy configuration"; 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 $${https_proxy+x} ]]; then echo "See the docker pull docs for proxy configuration"; 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 'if [[ ! -z $${BUILDARGS+x} ]]; then echo "See the docker pull docs for proxy configuration"; fi' >> /tmp/tmp/post-install
@echo 'sudo docker build --pull $$BUILDARGS -t gliderlabs/herokuish /var/lib/herokuish' >> /tmp/tmp/post-install @echo "sudo docker pull gliderlabs/herokuish:v${HEROKUISH_VERSION} && sudo docker tag gliderlabs/herokuish:v${HEROKUISH_VERSION} gliderlabs/herokuish:latest" >> /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
rm -rf /tmp/tmp/herokuish/.git /tmp/tmp/herokuish/.gitignore
@echo "-> Copying files into place"
mkdir -p "/tmp/build/var/lib"
cp -rf /tmp/tmp/herokuish /tmp/build/var/lib/herokuish
@echo "-> Creating $(HEROKUISH_PACKAGE_NAME)" @echo "-> Creating $(HEROKUISH_PACKAGE_NAME)"
sudo fpm -t deb -s dir -C /tmp/build -n herokuish -v $(HEROKUISH_VERSION) -a $(HEROKUISH_ARCHITECTURE) -p $(HEROKUISH_PACKAGE_NAME) --deb-pre-depends 'docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1) | docker-ce | docker-ee' --deb-pre-depends sudo --after-install /tmp/tmp/post-install --url "https://github.com/$(HEROKUISH_REPO_NAME)" --description $(HEROKUISH_DESCRIPTION) --license 'MIT License' . sudo fpm -t deb -s dir -C /tmp/build -n herokuish \
-v $(HEROKUISH_VERSION) \
-a $(HEROKUISH_ARCHITECTURE) \
-p $(HEROKUISH_PACKAGE_NAME) \
--deb-pre-depends 'docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1) | docker-ce | docker-ee' \
--deb-pre-depends sudo \
--after-install /tmp/tmp/post-install \
--url "https://github.com/$(HEROKUISH_REPO_NAME)" \
--description $(HEROKUISH_DESCRIPTION) \
--license 'MIT License' \
.
mv *.deb /tmp mv *.deb /tmp
deb-dokku: deb-dokku:
+11 -9
View File
@@ -22,14 +22,16 @@ rpm-herokuish:
rm -rf /tmp/tmp /tmp/build $(HEROKUISH_RPM_PACKAGE_NAME) rm -rf /tmp/tmp /tmp/build $(HEROKUISH_RPM_PACKAGE_NAME)
mkdir -p /tmp/tmp /tmp/build mkdir -p /tmp/tmp /tmp/build
@echo "-> Cloning repository" @echo "-> Creating rpm files"
git clone -q "https://github.com/$(HEROKUISH_REPO_NAME).git" \ @echo "#!/usr/bin/env bash" >> /tmp/tmp/post-install
--branch "v$(HEROKUISH_VERSION)" /tmp/tmp/herokuish > /dev/null @echo 'echo "Starting docker"' >> /tmp/tmp/post-install
rm -rf /tmp/tmp/herokuish/.git /tmp/tmp/herokuish/.gitignore @echo 'systemctl start docker' >> /tmp/tmp/post-install
@echo "sleep 5" >> /tmp/tmp/post-install
@echo "-> Copying files into place" @echo "echo 'Importing herokuish into docker (around 5 minutes)'" >> /tmp/tmp/post-install
mkdir -p "/tmp/build/var/lib" @echo 'if [[ ! -z $${http_proxy+x} ]]; then echo "See the docker pull docs for proxy configuration"; fi' >> /tmp/tmp/post-install
cp -rf /tmp/tmp/herokuish /tmp/build/var/lib/herokuish @echo 'if [[ ! -z $${https_proxy+x} ]]; then echo "See the docker pull docs for proxy configuration"; fi' >> /tmp/tmp/post-install
@echo 'if [[ ! -z $${BUILDARGS+x} ]]; then echo "See the docker pull docs for proxy configuration"; fi' >> /tmp/tmp/post-install
@echo "sudo docker pull gliderlabs/herokuish:v${HEROKUISH_VERSION} && sudo docker tag gliderlabs/herokuish:v${HEROKUISH_VERSION} gliderlabs/herokuish:latest" >> /tmp/tmp/post-install
@echo "-> Creating $(HEROKUISH_RPM_PACKAGE_NAME)" @echo "-> Creating $(HEROKUISH_RPM_PACKAGE_NAME)"
sudo fpm -t rpm -s dir -C /tmp/build -n herokuish \ sudo fpm -t rpm -s dir -C /tmp/build -n herokuish \
@@ -38,7 +40,7 @@ rpm-herokuish:
-p $(HEROKUISH_RPM_PACKAGE_NAME) \ -p $(HEROKUISH_RPM_PACKAGE_NAME) \
--depends '/usr/bin/docker' \ --depends '/usr/bin/docker' \
--depends 'sudo' \ --depends 'sudo' \
--after-install rpm/herokuish.postinst \ --after-install /tmp/tmp/post-install \
--url "https://github.com/$(HEROKUISH_REPO_NAME)" \ --url "https://github.com/$(HEROKUISH_REPO_NAME)" \
--description $(HEROKUISH_DESCRIPTION) \ --description $(HEROKUISH_DESCRIPTION) \
--license 'MIT License' \ --license 'MIT License' \
-14
View File
@@ -1,14 +0,0 @@
#!/usr/bin/env bash
set +o posix # rpm uses /bin/sh that forces bash in posix mode
main() {
echo 'Starting docker'
systemctl start docker
sleep 5
echo 'Importing herokuish into docker (around 5 minutes)'
sudo docker build --pull -t gliderlabs/herokuish /var/lib/herokuish 1> /dev/null
}
main