Question: Moving a Galaxy Docker instance from one server to another
gravatar for machinelearner
16 months ago by
machinelearner10 wrote:

Hi everyone!

Is there a way to move one instance of Docker Galaxy over from one server to another?

Here is the general timeline of events we have tried:

  1. Pull the stable base image
  2. Run the base image to create a container
  3. Made changes in the container (such as installing conda in the container)
  4. Commit the container to make a new image.
  5. Save the new image as a tar file on the first server.
  6. Load the new image into the other server.

After doing something along the lines of the described steps above, running the new image on the second server does not seem to work. Using the /usr/bin/startup script results in the following error:

Checking if database is up and running
Traceback (most recent call last):
  File "/usr/local/bin/", line 25, in <module>
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/orm/", line 2980, in count
    return self.from_self(col).scalar()
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/orm/", line 2749, in scalar
    ret =
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/orm/", line 2718, in one
    ret = list(self)
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/orm/", line 2761, in __iter__
    return self._execute_and_instances(context)
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/orm/", line 2774, in _execute_and_instances
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/orm/", line 2765, in _connection_from_session
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/orm/", line 893, in connection
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/orm/", line 900, in _connection_for_bind
    conn = engine.contextual_connect(**kw)
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/engine/", line 2039, in contextual_connect
    self._wrap_pool_connect(self.pool.connect, None),
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/engine/", line 2078, in _wrap_pool_connect
    e, dialect, self)
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/engine/", line 1405, in _handle_dbapi_exception_noconnection
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/util/", line 202, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/engine/", line 2074, in _wrap_pool_connect
    return fn()
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/", line 376, in connect
    return _ConnectionFairy._checkout(self)
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/", line 713, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/", line 480, in checkout
    rec = pool._do_get()
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/", line 1060, in _do_get
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/util/", line 60, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/", line 1057, in _do_get
    return self._create_connection()
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/", line 323, in _create_connection
    return _ConnectionRecord(self)
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/", line 449, in __init__
    self.connection = self.__connect()
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/", line 607, in __connect
    connection = self.__pool._invoke_creator(self)
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/engine/", line 97, in connect
    return dialect.connect(*cargs, **cparams)
  File "/galaxy_venv/local/lib/python2.7/site-packages/sqlalchemy/engine/", line 385, in connect
    return self.dbapi.connect(*cargs, **cparams)
  File "/galaxy_venv/local/lib/python2.7/site-packages/psycopg2/", line 164, in connect
    conn = _connect(dsn, connection_factory=connection_factory, async=async)
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not connect to server: Connection refused
    Is the server running on host "localhost" (::1) and accepting
    TCP/IP connections on port 5432?
could not connect to server: Connection refused
    Is the server running on host "localhost" ( and accepting
    TCP/IP connections on port 5432?

Not sure if this is a misunderstanding on our part about how to use docker or if we're missing a step somewhere in the move.


galaxy docker • 397 views
ADD COMMENTlink modified 16 months ago by Bjoern Gruening5.1k • written 16 months ago by machinelearner10
gravatar for Bjoern Gruening
16 months ago by
Bjoern Gruening5.1k
Bjoern Gruening5.1k wrote:


I think I do not get the question. So you have a Galaxy Docker image running on one server and want to start this on an other server? Just pull the same version on this other server and use the same /export/ folder as on the first server. This should be enough.

Why are you installing Conda manually? Galaxy Docker has Conda installed already. So ideally you don't need to change anything.



ADD COMMENTlink written 16 months ago by Bjoern Gruening5.1k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 177 users visited in the last hour