Details on the different options in a dockerfile are still required to be explained here!

Once we have a docker file, we can create locally the docker container by typing (in the same folder, where the ‘Dockerfile’ is located)

docker build -t user/example:0.1 -t user/example:latest .

Here, the ‘-t’ is used to tag the docker build. In Out example we assign the version number 0.1 and also declare it to be the latest. (There is an issue with the latest label, that I’ll explain later, for now this double tagging should be, however, sufficient). Besides the version number of the docker container, the docker image needs a name (here: example) and an associated username from docker hub (here: user). Depending on the complexity of the Dockerfile, the building process might take a while. Once the building is ready, we can push the image to the Docker hub by running

docker push user/example:0.1
docker push user/example:latest

Instead of creating docker images that contain only libraries, it is also possible to create docker images that contain data only. In that case, the dockerfile just downloads the datafiles.

If you use the docker daemon the first time to submit a image, you need to login to docker first. For that you need to run (:before you push the image):