docker-galaxy-stable
docker-galaxy-stable copied to clipboard
How to commit a new galaxy images?
I installed my docker galaxy follow the instructions https://github.com/bgruening/docker-galaxy-stable, and made some changes in the galaxy container.
# run docker galaxy, and it works!
$ docker run -d -p 8080:80 -p 8022:22 -p 8021:21 bgruening/galaxy-stable
# enter old_galaxy_container
$ docker exec -it <old_galaxy_container_id> /bin/bash
# make some changes, for example:
# install R
# make my own galaxy style in /galaxy-central/client/galaxy/scripts/*.js
root@5e8c9aec7931:/galaxy-central# /tool_deps/_conda/bin/conda install R
Fetching package metadata .........
Solving package specifications: .
...
root@5e8c9aec7931:/galaxy-central# exit
Now I want to create a new image from my old galaxy container's changes as follow:
$ docker stop <old_galaxy_container_id>
$ docker commit <old_galaxy_container_id> steven/galaxy-test:latest
$ docker run -i -t -p 10080:80 -p 10022:22 -p 10021:21 steven/galaxy-test:latest
Enable Galaxy reports authentification
umount: /var/lib/docker: must be superuser to umount
Traceback (most recent call last):
File "/usr/local/bin/export_user_files.py", line 61, in <module>
shutil.copytree( image_path, export_path )
File "/usr/lib/python2.7/shutil.py", line 171, in copytree
names = os.listdir(src)
OSError: [Errno 2] No such file or directory: '/galaxy-central/config/'
tmpfs on /proc/kcore type tmpfs (rw,nosuid,size=65536k,mode=755)
Disable Galaxy Interactive Environments. Start with --privileged to enable IE's.
Unlinking stale socket /var/run/supervisor.sock
Starting postgres
postgresql: ERROR (spawn error)
Checking if database is up and running
Traceback (most recent call last):
File "/usr/local/bin/check_database.py", line 18, in <module>
db_url = get_config(sys.argv)['db_url']
File "/galaxy-central/lib/galaxy/model/orm/scripts.py", line 99, in get_config
properties = load_app_properties(config_file=config_file, config_prefix=config_override, config_section=config_section)
File "/galaxy-central/lib/galaxy/util/properties.py", line 63, in load_app_properties
parser = nice_config_parser(config_file)
File "/galaxy-central/lib/galaxy/util/properties.py", line 93, in nice_config_parser
with open(path) as f:
IOError: [Errno 2] No such file or directory: 'config/galaxy.ini.sample'
Waiting for database
...
And I find the links in new images missed:
So how I can make a new image and keep my container changes works? Thank you.
When I was using containers that I had to commit I found that one needs to duplicate the config directory and then replace it after the container starts. For some reason starting a commited containers deletes the config directory (I never figured out why).
It seems I have a similar problem with an imported/committed images. They either would not start, with this message: "could not connect to server: Cannot assign requested address Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?"
..Or also give a "403: Forbidden" alert on the browser.
Initially I thought this had to do with permissions on the shared folder, but now it seems there might be a more fundamental problem.
Any solution or workaround for this issue?
Hi, did you find a solution?