dokku / dokku-mongo

a mongo plugin for dokku
MIT License
177 stars 32 forks source link

MongoDB image mongo:3.2.0 not found #45

Closed ElliotChong closed 8 years ago

ElliotChong commented 8 years ago

When declaring: export MONGO_IMAGE_VERSION="3.2.0"

And executing: dokku mongo:create

I'm receiving the error message: MongoDB image mongo:3.2.0 not found

According to the docs, shouldn't any version specified by the official mongo image be valid?

josegonzalez commented 8 years ago

Can you run that dokku mongo:create method with dokku trace on and gist the output? As well, can you list the output of docker images?

ElliotChong commented 8 years ago
# dokku mongo:create bongo
+ parse_args mongo:create bongo
+ for arg in '"$@"'
+ case "$arg" in
+ for arg in '"$@"'
+ case "$arg" in
+ return 0
+ args=("$@")
+ [[ mongo:create =~ ^--.* ]]
+ has_tty
++ /usr/bin/tty
+ [[ /dev/pts/0 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ root != \d\o\k\k\u ]]
+ [[ mongo:create != plugin:*install* ]]
+ [[ mongo:create != \p\l\u\g\i\n\:\u\p\d\a\t\e ]]
++ id -un
+ export SSH_USER=root
+ SSH_USER=root
+ sudo -u dokku -E -H /usr/local/bin/dokku mongo:create bongo
+ [[ -f /home/dokku/dokkurc ]]
+ [[ -d /home/dokku/.dokkurc ]]
+ for f in '$DOKKU_ROOT/.dokkurc/*'
+ source /home/dokku/.dokkurc/DOKKU_TRACE
++ export DOKKU_TRACE=1
++ DOKKU_TRACE=1
+ [[ -n 1 ]]
+ set -x
+ parse_args mongo:create bongo
+ for arg in '"$@"'
+ case "$arg" in
+ for arg in '"$@"'
+ case "$arg" in
+ return 0
+ args=("$@")
+ [[ mongo:create =~ ^--.* ]]
+ has_tty
++ /usr/bin/tty
+ [[ /dev/pts/0 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
+ [[ -n '' ]]
+ dokku_auth mongo:create bongo
+ export SSH_USER=root
+ SSH_USER=root
+ export SSH_NAME=default
+ SSH_NAME=default
+ plugn trigger user-auth root default mongo:create bongo
+ return 0
+ case "$1" in
+ implemented=0
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/00_dokku-standard/commands mongo:create bongo
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/20_events/commands mongo:create bongo
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/apps/commands mongo:create bongo
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/backup/commands mongo:create bongo
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/certs/commands mongo:create bongo
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/config/commands mongo:create bongo
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/docker-options/commands mongo:create bongo
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/domains/commands mongo:create bongo
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/enter/commands mongo:create bongo
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/git/commands mongo:create bongo
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/logs/commands mongo:create bongo
++ dirname /var/lib/dokku/plugins/enabled/logs/commands
+ source /var/lib/dokku/plugins/enabled/logs/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ source /var/lib/dokku/plugins/available/config/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+ case "$1" in
+ exit 10
+ exit_code=10
+ set -e
+ [[ 10 -eq 10 ]]
+ continue
+ for script in '$PLUGIN_ENABLED_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/enabled/mongo/commands mongo:create bongo
+ PLUGIN_BASE_PATH=/var/lib/dokku/plugins
+ [[ -n 1 ]]
+ PLUGIN_BASE_PATH=/var/lib/dokku/plugins/enabled
+ source /var/lib/dokku/plugins/enabled/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++ dirname /var/lib/dokku/plugins/enabled/mongo/commands
+ source /var/lib/dokku/plugins/enabled/mongo/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+++ dirname /var/lib/dokku/plugins/enabled/mongo/commands
++ source /var/lib/dokku/plugins/enabled/mongo/config
+++ export MONGO_IMAGE=mongo
+++ MONGO_IMAGE=mongo
+++ export MONGO_IMAGE_VERSION=3.2.0
+++ MONGO_IMAGE_VERSION=3.2.0
+++ export MONGO_ROOT=/var/lib/dokku/services/mongo
+++ MONGO_ROOT=/var/lib/dokku/services/mongo
+++ export 'MONGO_CONFIG_OPTIONS= --storageEngine wiredTiger --auth '
+++ MONGO_CONFIG_OPTIONS=' --storageEngine wiredTiger --auth '
+++ export PLUGIN_COMMAND_PREFIX=mongo
+++ PLUGIN_COMMAND_PREFIX=mongo
+++ export PLUGIN_DATA_ROOT=/var/lib/dokku/services/mongo
+++ PLUGIN_DATA_ROOT=/var/lib/dokku/services/mongo
+++ PLUGIN_DATASTORE_PORTS=(27017 27018 27019 28017)
+++ export PLUGIN_DATASTORE_PORTS
+++ export PLUGIN_DEFAULT_ALIAS=MONGO
+++ PLUGIN_DEFAULT_ALIAS=MONGO
+++ export PLUGIN_ALT_ALIAS=DOKKU_MONGO
+++ PLUGIN_ALT_ALIAS=DOKKU_MONGO
+++ export PLUGIN_IMAGE=mongo
+++ PLUGIN_IMAGE=mongo
+++ export PLUGIN_IMAGE_VERSION=3.2.0
+++ PLUGIN_IMAGE_VERSION=3.2.0
+++ export PLUGIN_SCHEME=mongodb
+++ PLUGIN_SCHEME=mongodb
+++ export PLUGIN_SERVICE=MongoDB
+++ PLUGIN_SERVICE=MongoDB
++ dirname /var/lib/dokku/plugins/enabled/mongo/commands
+ source /var/lib/dokku/plugins/enabled/mongo/config
++ export MONGO_IMAGE=mongo
++ MONGO_IMAGE=mongo
++ export MONGO_IMAGE_VERSION=3.2.0
++ MONGO_IMAGE_VERSION=3.2.0
++ export MONGO_ROOT=/var/lib/dokku/services/mongo
++ MONGO_ROOT=/var/lib/dokku/services/mongo
++ export 'MONGO_CONFIG_OPTIONS= --storageEngine wiredTiger --auth '
++ MONGO_CONFIG_OPTIONS=' --storageEngine wiredTiger --auth '
++ export PLUGIN_COMMAND_PREFIX=mongo
++ PLUGIN_COMMAND_PREFIX=mongo
++ export PLUGIN_DATA_ROOT=/var/lib/dokku/services/mongo
++ PLUGIN_DATA_ROOT=/var/lib/dokku/services/mongo
++ PLUGIN_DATASTORE_PORTS=(27017 27018 27019 28017)
++ export PLUGIN_DATASTORE_PORTS
++ export PLUGIN_DEFAULT_ALIAS=MONGO
++ PLUGIN_DEFAULT_ALIAS=MONGO
++ export PLUGIN_ALT_ALIAS=DOKKU_MONGO
++ PLUGIN_ALT_ALIAS=DOKKU_MONGO
++ export PLUGIN_IMAGE=mongo
++ PLUGIN_IMAGE=mongo
++ export PLUGIN_IMAGE_VERSION=3.2.0
++ PLUGIN_IMAGE_VERSION=3.2.0
++ export PLUGIN_SCHEME=mongodb
++ PLUGIN_SCHEME=mongodb
++ export PLUGIN_SERVICE=MongoDB
++ PLUGIN_SERVICE=MongoDB
+ [[ mongo:create == mongo:* ]]
+ [[ ! -d /var/lib/dokku/services/mongo ]]
+ case "$1" in
+ [[ -z bongo ]]
+ [[ ! -d /var/lib/dokku/services/mongo/bongo ]]
+ SERVICE=bongo
+ SERVICE_ROOT=/var/lib/dokku/services/mongo/bongo
+ LINKS_FILE=/var/lib/dokku/services/mongo/bongo/LINKS
+ grep -q ' 3.2.0 '
+ grep -e '^mongo '
+ docker images
+ dokku_log_fail 'MongoDB image mongo:3.2.0 not found'
+ echo 'MongoDB image mongo:3.2.0 not found'
MongoDB image mongo:3.2.0 not found
+ exit 1
+ exit_code=1
+ set -e
+ [[ 1 -eq 10 ]]
+ implemented=1
+ [[ 1 -ne 0 ]]
+ exit 1
josegonzalez commented 8 years ago

What is the output of docker images?

ElliotChong commented 8 years ago
REPOSITORY                TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
gliderlabs/herokuish      latest              e1793943656c        2 weeks ago         1.29 GB
heroku/cedar              14                  56b31ddc05ad        3 weeks ago         1.267 GB
svendowideit/ambassador   latest              7feb6b1d3d04        9 weeks ago         6.454 MB
mongo                     3.0.6               0c8e4011b334        10 weeks ago        261.3 MB
dokkupaas/wait            latest              c0df71274c7a        12 weeks ago        1.096 MB

Was I supposed to manually pull down the docker image first?

josegonzalez commented 8 years ago

You need to manually pull that image before running mongo:create.

Note: would be awesome if you made a pull request to update our version here to the latest mongo image :)

ElliotChong commented 8 years ago

Thanks for the assist @josegonzalez! #noobmistake

paulwalker commented 8 years ago

A more general FYI for noobs like me learning dokku via Vagrant. You are most likely using a dokku user ssh session, in which case you will need to use sudo when communicating with the docker daemon, e.g. sudo docker pull mongo:latest.

Also, I would recommend that this plugin simply default the container version to "latest" rather than having to update constantly...

josegonzalez commented 8 years ago

@paulwalker feel free to make a pr if you feel strongly about your recommendation.