Docker Commands Reference Guide


Below, we will cover some of the basic Docker commands that you will find useful when interacting with Docker containers. Many of these commands can be found on the Docker commands homepage and from the Galaxy Docker Github repositoryGitHub is a web-based Git repository hosting service. It offers all of the distributed version control and source code management (SCM) functionality of Git as well as adding its own features.. They are simply reviewed here for convenience.

Container Commands

                                            $ docker run -d -p 8080:80 chrisd/amrplusplus
                                            $ docker run -d -p 8080:80 -p 8021:21 chrisd/amrplusplus
$ docker ps

CONTAINER ID        IMAGE                COMMAND              CREATED             STATUS              PORTS                                                            NAMES
6296a2688b71        chrisd/amrplusplus   "/usr/bin/startup"   10 hours ago        Up 10 hours         8800/tcp, 9002/tcp,>21/tcp,>80/tcp   elated_cray

                                            $ docker stop 6296a2688b71
$ docker ps

CONTAINER ID        IMAGE                COMMAND              CREATED             STATUS              PORTS             NAMES
$ docker images

REPOSITORY                   TAG                 IMAGE ID            CREATED             SIZE
chrisd/amrplusplus           latest              976681113852        3 days ago          1.623 GB

You will be launched into a Bash shell and allowed to explore the container.

                                            $ docker run -i -t -p 8080:80 chrisd/amrplusplus /bin/bash

By DEFAULT, Galaxy containers are volatile, meaning that once they are stopped, all data and uploaded files will be removed. This command can be used to give a running Galaxy container persistent storage

                                            $ docker run -d -p 8080:80 -v /home/user/galaxy_storage/:/export/ chrisd/amrplusplus