OverviewTeaching: min Exercises: 10 minQuestions
How can I build my own images?Objectives
Learn how to create Docker images
Docker images are created using simple recipe files called Dockerfiles. Let’s create a Dockerfile. Open your favourite editor and type the following text, and save it under the name
Dockerfile (no extensions) inside an empty folder.
FROM bids/base_fsl RUN apt-get update -y && apt-get install -y r-base
Open a terminal in the same directory and run the following command:
docker build -t fsl_with_r .
Don’t forget about the dot at the end! It indicates the directory where Docker will look for a Dockerfile - in our case it’s the current working directory. This should build your image. You can run it like the previous one:
docker run -ti --rm fsl_with_r
Container images are build using simple recipes - Dockerfiles.