How to get a new Docker image to Sandbox
Docker containers enable you to roll up all the files and other dependencies needed to run an application/tool in a separate system isolated from all other processes on your computer. A container image refers to a file system holding these necessary folders and files.
To learn more about Docker visit Docker get started page and see Docker tutorial video.
If you want to run a tool in your sandbox that might require the installation and assembly of many files, then we offer you the option to import and run it as a Docker container.
To access Docker, open Terminal Emulator from the Application dropdown menu at Sandbox desktop. To see all Docker commands and options available, type
:~$ docker --helpTo see options for pull command
:~$ docker pull --helpTo pull an image or a repository from a registry
:~$ docker pull path/to/repositoryAn example:
:~$ docker pull eu.gcr.io/finngen-sandbox-v3-containers/bioinformatics:1.0.1To list Docker images
:~$ docker imagesREPOSITORY TAG IMAGE ID CREATED SIZE
path/to/repository 1.0.1 i1m2a3g4e5 2 years ago 3.91GBAssign a name (here "tools") to the container and run Docker container in background (-d option) keeping STDIN open (-i option) and allocating a pseudo-TTY (-t option)
:~$ docker run -dit --name tools i1m2a3g4e5To list containers those are running
:~$ docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c1on2ta3ine4r i1m2a3g4e5 "/bin/bash" 3 minutes ago Up 3 minutes toolsTo stop container
:~$ docker stop toolsTo list stopped containers
:~$ docker ps -aCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c1on2ta3ine4r i1m2a3g4e5 "/bin/bash" 4 minutes ago Exited (0) About a minute ago toolsTo start the run again
:~$ docker start toolsTo attach local standard input, output and error streams to a running container image
:~$ docker attach toolsreturns (if nothing seems to happen press enter again):
root@01r23o45o67t:/#List folders in the container
:/# lsbin boot dev etc home lib lib32 lib64 liftover media mnt opt proc root run sbin srv sys tmp usr varYou can enter a folder typing cd folder_name e.g.
:/# cd homeTo go back to the upper folder
:/# cd ..Check that plink is runnable within the image:
:/# plinkPLINK v1.90b6.9 64-bit (4 Mar 2019) www.cog-genomics.org/plink/1.9/
(C) 2005-2019 Shaun Purcell, Christopher Chang GNU General Public License v3
plink <input flag(s)...> [command flag(s)...] [other flag(s)...]
plink --help [flag name(s)...]
Commands include --make-bed, --recode, --flip-scan, --merge-list,
--write-snplist, --list-duplicate-vars, --freqx, --missing, --test-mishap,
--hardy, --mendel, --ibc, --impute-sex, --indep-pairphase, --r2, --show-tags,
--blocks, --distance, --genome, --homozyg, --make-rel, --make-grm-gz,
--rel-cutoff, --cluster, --pca, --neighbour, --ibs-test, --regress-distance,
--model, --bd, --gxe, --logistic, --dosage, --lasso, --test-missing,
--make-perm-pheno, --tdt, --qfam, --annotate, --clump, --gene-report,
--meta-analysis, --epistasis, --fast-epistasis, and --score.
'plink --help | more' describes all functions (warning: long).To exit from the image
:/# exitList stopped containers
:~$ docker ps -aCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c1on2ta3ine4r i1m2a3g4e5 "/bin/bash" 10 minutes ago Exited (0) About a minute ago toolsRemove container
:~$ docker rm toolsCheck that container is removed
:~$ docker ps -aCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESRemove the image
:~$ docker rmi i1m2a3g4e5Last updated
Was this helpful?