About Docker

In child words, Docker is a tool to ease running « any » applications on « any » systems. Of course there is conditions and rules to follow, but to start using Docker there is no need to bother yet.

The docker story starts as root like that :

[root@localhost ~]# yum install docker
Yum command has been deprecated, redirecting to '/usr/bin/dnf install docker'.
See 'man dnf' and 'man yum2dnf' for more information.
To transfer transaction metadata from yum to DNF, run:
'dnf install python-dnf-plugins-extras-migrate && dnf-2 migrate'

Last metadata expiration check: 0:43:54 ago on Sat Aug 13 08:51:04 2016.
Dependencies resolved.
 Package Arch Version Repository Size
 docker x86_64 2:1.10.3-26.git1ecb834.fc24 updates 6.7 M
 docker-selinux x86_64 2:1.10.3-26.git1ecb834.fc24 updates 74 k
 docker-v1.10-migrator x86_64 2:1.10.3-26.git1ecb834.fc24 updates 1.9 M

Transaction Summary

Total download size: 8.7 M
Installed size: 35 M
Is this ok [y/N]:

And once you say yes … you are already half way, docker is terribly easy to use ..

You need to start the service first:

# systemctl enable docker.service
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
# systemctl start docker

And then you can dowload an image:

> sudo docker pull "atlassian/agent-setup-git:latest"

Trying to pull repository docker.io/atlassian/agent-setup-git ... 
latest: Pulling from docker.io/atlassian/agent-setup-git
6c123565ed5e: Pull complete 
2a3a5d549d2b: Pull complete 
Digest: sha256:e1d2f19b296912e43eed9ea814dcfddbe68a23256791663e53316a0127ddf375
Status: Downloaded newer image for docker.io/atlassian/agent-setup-git:latest

And you can run your first command in this docker:

> sudo docker run "atlassian/agent-setup-git:latest" ls 


You can also start using docker configuration file which look like that:

FROM fedora:24

RUN dnf install -y gtk2-devel cmake libXmu-devel
RUN mkdir /toto
COPY . /toto/
RUN ls /toto

And building an image like that:

> sudo docker build -f DockerFile -t docker.io/bodman/test:fedora24 ./

Docker tends to generate a lot of files to work. The best is to manage where those files are created. With Fedora, in the configuration file /etc/sysconfig/docker find the OPTIONS parameter and add -g /path/to/store/docker/files argument.

To see infos about docker :

docker info

To increase the maximum size of docker images add in the file /etc/sysconfig/docker-storage :

DOCKER_STORAGE_OPTIONS= – -storage-opt dm.basesize=30G



Laisser un commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion /  Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion /  Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion /  Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion /  Changer )


Connexion à %s