mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
Merge pull request #3098 from dokku/2828-pull-herokuish
Pull herokuish from docker hub when installing via package
This commit is contained in:
28
deb.mk
28
deb.mk
@@ -93,21 +93,23 @@ deb-herokuish:
|
||||
@echo "#!/usr/bin/env bash" >> /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 '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 --pull $$BUILDARGS -t gliderlabs/herokuish /var/lib/herokuish' >> /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 '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 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_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
|
||||
|
||||
deb-dokku:
|
||||
|
||||
20
rpm.mk
20
rpm.mk
@@ -22,14 +22,16 @@ rpm-herokuish:
|
||||
rm -rf /tmp/tmp /tmp/build $(HEROKUISH_RPM_PACKAGE_NAME)
|
||||
mkdir -p /tmp/tmp /tmp/build
|
||||
|
||||
@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 rpm files"
|
||||
@echo "#!/usr/bin/env bash" >> /tmp/tmp/post-install
|
||||
@echo 'echo "Starting docker"' >> /tmp/tmp/post-install
|
||||
@echo 'systemctl start docker' >> /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 '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 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)"
|
||||
sudo fpm -t rpm -s dir -C /tmp/build -n herokuish \
|
||||
@@ -38,7 +40,7 @@ rpm-herokuish:
|
||||
-p $(HEROKUISH_RPM_PACKAGE_NAME) \
|
||||
--depends '/usr/bin/docker' \
|
||||
--depends 'sudo' \
|
||||
--after-install rpm/herokuish.postinst \
|
||||
--after-install /tmp/tmp/post-install \
|
||||
--url "https://github.com/$(HEROKUISH_REPO_NAME)" \
|
||||
--description $(HEROKUISH_DESCRIPTION) \
|
||||
--license 'MIT License' \
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user