Merge pull request #1810 from dokku/josegonzalez-patch-2

Dockerfile installation requirements
This commit is contained in:
Jose Diaz-Gonzalez
2016-01-01 19:42:54 -05:00
3 changed files with 14 additions and 7 deletions

View File

@@ -29,6 +29,7 @@ hostname -f > /dev/null 2>&1 || {
exit 1
}
echo "--> Ensuring we have the proper dependencies"
apt-get update -qq > /dev/null
[[ $(lsb_release -sr) == "12.04" ]] && apt-get install -qq -y python-software-properties
@@ -90,6 +91,7 @@ elif [[ -n $DOKKU_TAG ]]; then
elif [[ "$major" -eq "0" ]] && [[ "$minor" -ge "4" ]] && [[ "$patch" -ge "0" ]]; then
export DOKKU_CHECKOUT="$DOKKU_SEMVER"
dokku_install_package
echo "--> Running post-install dependency installation"
sudo -E dokku plugin:install-dependencies --core
else
export DOKKU_CHECKOUT="$DOKKU_TAG"
@@ -97,6 +99,7 @@ elif [[ -n $DOKKU_TAG ]]; then
fi
else
dokku_install_package
echo "--> Running post-install dependency installation"
sudo -E dokku plugin:install-dependencies --core
fi

14
debian/postinst vendored
View File

@@ -1,5 +1,5 @@
#!/bin/sh
set -e
#!/bin/bash
set -eo pipefail; [[ $TRACE ]] && set -x
. /usr/share/debconf/confmodule
@@ -18,13 +18,13 @@ case "$1" in
egrep -i "^docker" /etc/group || groupadd docker
usermod -aG docker dokku
# setup plugin directories
echo "setup plugin directories"
# should be replaced by `plugn init`
mkdir -p ${DOKKU_LIB_ROOT}/core-plugins/available ${DOKKU_LIB_ROOT}/plugins/available
mkdir -p ${DOKKU_LIB_ROOT}/core-plugins/enabled ${DOKKU_LIB_ROOT}/plugins/enabled
touch ${DOKKU_LIB_ROOT}/core-plugins/config.toml ${DOKKU_LIB_ROOT}/plugins/config.toml
# migrate old plugins
echo "migrate old plugins"
find ${DOKKU_LIB_ROOT}/plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do
if [ "$plugin" = "available" ] || [ "$plugin" = "enabled" ]; then
continue
@@ -35,7 +35,7 @@ case "$1" in
fi
done
# enable all core plugins
echo "enable all core plugins"
find ${DOKKU_LIB_ROOT}/core-plugins/available -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do
if [ ! -d ${DOKKU_LIB_ROOT}/plugins/available/$plugin ]; then
ln -s ${DOKKU_LIB_ROOT}/core-plugins/available/$plugin ${DOKKU_LIB_ROOT}/plugins/available/$plugin;
@@ -45,17 +45,20 @@ case "$1" in
done
chown dokku:dokku -R ${DOKKU_LIB_ROOT}/plugins ${DOKKU_LIB_ROOT}/core-plugins
echo "install all core plugins"
dokku plugin:install --core
rm -f ${DOKKU_ROOT}/VERSION
cp ${DOKKU_LIB_ROOT}/STABLE_VERSION ${DOKKU_ROOT}/VERSION
echo "starting dokku-installer if necessary"
if [ -f /etc/init/dokku-installer.conf ] && service dokku-installer status 2> /dev/null | grep waiting; then
sudo service dokku-installer start
fi
db_get "dokku/web_config"
if [ "$RET" = "true" ]; then
db_stop
exit 0
fi
@@ -84,4 +87,5 @@ case "$1" in
;;
esac
db_stop
exit 0

4
debian/preinst vendored
View File

@@ -1,5 +1,5 @@
#!/bin/sh
set -e
#!/bin/bash
set -eo pipefail; [[ $TRACE ]] && set -x
. /usr/share/debconf/confmodule