Docker: Difference between revisions

From Grid5000
Jump to navigation Jump to search
No edit summary
Line 27: Line 27:
* the docker-g5k program
* the docker-g5k program


; Manage a node with docker-machine
; Provision a node with docker-machine
The [https://github.com/Spirals-Team/docker-machine-driver-g5k driver for docker-machine] allows you to reserve a node on Grid'5000 and to install a Linux image and Docker Engine on it, from your computer and in one single command.
The [https://github.com/Spirals-Team/docker-machine-driver-g5k driver for docker-machine] allows you to reserve a node on Grid'5000 and to install a Linux image and Docker Engine on it, from your computer and in one single command.
The reserved node is then available from commands like <code>docker-machine ssh</code> (standard ssh commands don't work when nodes are reserved with docker-machine).
The reserved node is then available from commands like <code>docker-machine ssh</code> (standard ssh commands don't work when nodes are reserved with docker-machine).

Revision as of 16:41, 10 November 2017


Docker is a software technology that provides operating-system-level virtualization. In this page, we present some tools that are specifically designed to use Docker on Grid'5000.

Installing Docker from a node

You can install and use Docker from a node with the standard environment by following these instructions:

Reserve a node
Terminal.png fnancy:
oarsub -I

(you can also use option -t deploy and Kadeploy if you prefer)

Install Docker

The script g5k-setup-docker, available from the standard environment, installs Docker locally. Option -c makes docker command available without needing to log out and reconnect to the node

Terminal.png node:
g5k-setup-docker -c
Run Docker

You can now check that Docker is up and running

Terminal.png node:
docker run hello-world

Using docker-machine and docker-g5k

The Spirals Team in Lille developped two tools to ease Docker usage on Grid'5000:

  • a docker-machine driver
  • the docker-g5k program
Provision a node with docker-machine

The driver for docker-machine allows you to reserve a node on Grid'5000 and to install a Linux image and Docker Engine on it, from your computer and in one single command. The reserved node is then available from commands like docker-machine ssh (standard ssh commands don't work when nodes are reserved with docker-machine).

Create a Swarm with docker-g5k

The docker-g5k program allows you to reserve several nodes, possibly on different sites, and to install a Linux image and Docker Engine on each node, in one single command. This command configures a Swarm, i.e. a set of Docker containers distributed over several nodes that communicate with each other.

Managing Docker images ?

We recommend the following ways to manage Docker images on Grid'5000:

Use docker load/save

You can use docker load and docker save commands with .tgz docker images stored in your home (or elsewhere). Each user's home is available (NFS mounted) from any node deployed with the standard environment.

Use Inria private registry

A private registry is available for Inria members. Look at Inria private registry and its documentation.

Use a persistent VM

If you need to create your own private registry, you can request a persistent Virtual Machine.