OverviewTeaching: 0 min Exercises: 15 minQuestions
Pull (download) an image from Docker Hub
Run shell inside a container
Mount local folders
Apply software from the image to analyze local data
Let’s pull (download) an image:
docker pull bids/base_fsl
Where is this image coming from? From Docker Hub.
inside the container (an instance of an image) and poke around:
docker run -ti --rm bids/base_fsl
A Linux shell prompt should appear (independently of your host operating system!). Play around. Can you answer the following questions:
exit). Run the container again. Are the files still there?
Before we try to access files from the localhost lets get some example data
Let’s mount this folder so it will be accessible from the container when we run it
docker run -ti --rm -v D:\docker_tutorial:/data bids/base_fsl
/datafolder inside the container?
/datafolder? For example
fslmaths /data/tfMRI_SOCIAL_TOM-RANDOM_zstat1.nii.gz -kernel gauss 10 /data/smoothed.nii.gz
Container images are downloaded from Docker Hub.
You can run shell inside the container.
Only explicitly mounted host folder are accessible inside the container.