Upload the Docker image to a repository

Optionally, the Docker image can be uploaded to a central repository, such as Amazon Elastic Container Repository (AWS ECR) or Docker Hub. In this example, we will upload the image to Docker Hub.

Note: To run workflows containing external applications on the CLC Genomics Cloud Engine, the Docker image must be published in the Amazon Elastic Container Repository (ECR) on the same Amazon account where the CLC Genomics Cloud Engine is deployed, as described in the Cloud Plugin manual: https://resources.qiagenbioinformatics.com/manuals/cloudplugin/current/index.php?manual=External_applications_in_cloud.html

Log in to Docker Hub:

docker login --username=dockerhubhubusername

Find the image ID of the image we just created for MAFFT:

docker login --username=dockerhubhubusername

The output should look something like this:

REPOSITORY      TAG    IMAGE ID            CREATED            SIZE
example/mafft   0.0.1  01d5c588523c        2 hours ago        209MB

Take the number in the column "IMAGE ID", and map it to the desired repository on Docker Hub:

docker tag 01d5c588523c dockerhubusername/example-repository:0.0.1

Finally, push the image to Docker Hub.

docker push dockerhubusername/example-repository

Before testing the uploaded image works, remove all local images and containers associated with the same ID:

docker rmi -f 01d5c588523c

Run a command to start up a container created from the image uploaded to DockerHub:

docker run -v /home/user1/dockersharearea:/mnt/mafft 
dockerhubusername/example-repository:0.0.1 /mafft-linux64/mafft.bat 

The initial output will report "Unable to find image 'dockerhubusername/example-repository:0.0.1' locally". The image is then pulled dynamically from the online repository.