Outils pour utilisateurs

Outils du site


Panneau latéral

Menu tree

Welcome:Debian:Docker

Installation of “Docker” on Debian 10
Starting situation: fresh installation (netinstall), only with server SSH and general utilities
User “arnaud” existing.

Packages

# apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common
# curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
# apt-key fingerprint 0EBFCD88
# add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
# apt update && apt install docker-ce

Premier test

  • Set “arnaud” as member of the group “Docker”
    # usermod -aG docker arnaud 
  • Test
    # su arnaud
    $ cd ~
    $ docker run hello-world
         Unable to find image 'hello-world:latest' locally
         latest: Pulling from library/hello-world
         d1725b59e92d: Pull complete 
         Digest: sha256:0add3ace90ecb4adbf7777e9aacf18357296e799f81cabc9fde470971e499788
         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.
             (amd64)
          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 ID:
          https://hub.docker.com/ 
    
         For more examples and ideas, visit:
          https://docs.docker.com/get-started/

Installation Docker Compose

https://www.digitalocean.com/community/tutorials/how-to-install-docker-compose-on-ubuntu-16-04

Regarder quelle version de “compose” est la dernière: https://github.com/docker/compose/releases (ici 1.25.4).

# curl -L https://github.com/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
# chmod +x /usr/local/bin/docker-compose
$ docker-compose --version
docker-compose version 1.23.1, build b02f1306
Welcome/Debian/Docker.txt · Dernière modification: 2020/03/02 17:24 par arnaud