In this case, the conda install does not work -- instead, this Dockerfile gets the release.
Steps to build this docker container.
- Determine the dependencies by iterative running of .configure
- Use ubuntu base image
- get each of the dependencies
- run the steps specified for building and installing
To edit the files:
- Use a simple editor (Text Edit on Mac is fine) - we want to be cautious about unseen characters
- Use emacs (can be installed with conda)
conda install -c conda forge emacsTo build your image from the command line:
- Can do this on Google shell - docker is installed and available
docker build -t samtools:v1.16.1 .To test this tool from the command line
Set up an environment variable capturing your current command line:
PWD=$(pwd)Then mount and use your current directory and call the tool now encapsulated within the environment.
Any samtools command can be used to check.
docker run -it -v $PWD:$PWD -w $PWD samtools:v1.16.1 samtools --version(Optional) Deposit your container in the your CAVATICA Docker Registry
If you are working with Kids First or INCLUDE data, and you are registered with either the Kids First DRC or the INCLUDE Data Hub, you have access to a platform as a service, CAVATICA by Seven Bridges.
If you do, you Docker Image Repository Specific to you is at the location of pgc-images.sbgenomics.com/[YOUR CAVATICA USERNAME]
There are three steps to building and using a container
- build
- tag
- push
We have built and we did tag this (I built the above on my desktop which is a mac, but it could have been built within a google shell. Examples of how to do this are found in the Elements of Style in Workflow Creation and Maintenance, Day 3
To tag the image just built, you need the image id, to get that simply use the command docker images.
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
samtools latest 0ca8aaf01be0 16 minutes ago 1.53GBNow we re-tag it for pushing to our own personal CAVATICA docker container registry.
docker tag 0ca8aaf01be0 pgc-images.sbgenomics.com/[YOUR CAVATICA USERID]/samtools:v1.16.1There is actually another step required before you can do your push to the registry. You need to authenticate.
Navigate to the CAVATICA Developers Tab.
Select Authentication Token, if you have not done so, generate that token.
Then Copy the token and paste it in the proper location in the command below (after -p for password)
docker login pgc-images.sbgenomics.com -u [YOUR CAVATICA USERNAME] -p [YOUR AUTHENTICATION TOKEN]Now that we have
-
tagged :whitecheck our docker image and
-
we have authenticated :whitecheck
docker push pgc-images.sbgenomics.com/[YOUR CAVATICA USERNAME]/samtools:v1.16.1You know things are going correctly when you see something to the effect of:
The push refers to repository [pgc-images.sbgenomics.com/deslattesmaysa2/samtools:v1.16.1]
ea25457229f1: Pushed
17280cc0fa6b: Pushed
ab2731ec3f53: Pushed
6fa1f4185aa2: Pushed
ad6562704f37: Pushed
latest: digest: sha256:3b1976baa7c4aaa2afd25098c41c754e2579060b6c1da32282c45ac8a10293a9 size: 1373