Docker VM

Run containers on the EGI Cloud on a single VM with Docker

The EGI Docker VA is a ready-to-use Virtual Machine Image with docker and docker-compose pre-installed.

You can start that image as any other VA available from AppDB:

  1. Go to the EGI Docker image entry in AppDB.

  2. Check the identifiers of the endpoint, image and flavor you want to use at the provider.

  3. Use a ssh key when, so you can log into the VM once it's instantiated.

  4. Once up, just ssh in the VM and start using docker as usual.

Using docker from inside the VM

You can log in with user ubuntu and your ssh key:

ssh -i <yourprivatekey> ubuntu@<your VM ip>

Once in, you can run any docker command, e.g.:

ubuntu@fedcloud_vm:~$ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
b901d36b6f2f: Pull complete
0a6ba66e537a: Pull complete
Digest: sha256:8be990ef2aeb16dbcb9271ddfe2610fa6658d13f6dfb8bc72074cc1ca36966a7
Status: Downloaded newer image for hello-world:latest
Hello from Docker.
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker Hub account:
 https://hub.docker.com
For more examples and ideas, visit:
 https://docs.docker.com/userguide/

Docker-compose can be also used to execute applications with more than one container running together, follow this documentation to learn more.

Last modified January 11, 2021: Fix linter issues (#172) (2219631)