Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docker_installation_on_fedora [2019/01/24 10:45] – [postuninstall] rpjdaydocker_installation_on_fedora [2019/01/24 14:01] (current) – [Installing Docker and Docker Compose] rpjday
Line 2: Line 2:
  
 How to install and test Docker and friends on current Fedora 29. How to install and test Docker and friends on current Fedora 29.
 +
 +Extra:
 +
 +  * ''curl -fsSL get.docker.com -o get-docker.sh''
 +
 ===== Links ===== ===== Links =====
  
Line 9: Line 14:
       * [[https://docs.docker.com/install/linux/linux-postinstall/|Post-installation steps for Linux]]       * [[https://docs.docker.com/install/linux/linux-postinstall/|Post-installation steps for Linux]]
  
-===== Get rid of any earlier Docker packages =====+===== Get rid of earlier Docker/container content =====
  
 Fedora's Docker packaging has undergone some reorganization, so you first need to get rid of all earlier Docker-related packages. First, take a quick look at what Docker-related packages are already installed: Fedora's Docker packaging has undergone some reorganization, so you first need to get rid of all earlier Docker-related packages. First, take a quick look at what Docker-related packages are already installed:
Line 77: Line 82:
  
 <code> <code>
-$ sudo dnf install docker-ce docker-compose+$ sudo dnf install docker-ce [docker-compose]
 </code> </code>
  
Line 92: Line 97:
 </code> </code>
  
 +Should create group ''docker''.
 ===== Docker RPM scripts ===== ===== Docker RPM scripts =====
  
Line 144: Line 150:
 </code> </code>
 ===== Starting Docker ===== ===== Starting Docker =====
 +
 +<code>
 +$ systemctl status docker.service
 +● docker.service - Docker Application Container Engine
 +   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
 +   Active: inactive (dead)
 +     Docs: https://docs.docker.com
 +$
 +</code>
  
 <code> <code>
Line 154: Line 169:
 <code> <code>
 $ systemctl status docker $ systemctl status docker
 +● docker.service - Docker Application Container Engine
 +   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
 +   Active: active (running) since Thu 2019-01-24 05:45:18 EST; 6s ago
 +     Docs: https://docs.docker.com
 + Main PID: 16470 (dockerd)
 +    Tasks: 46
 +   Memory: 58.3M
 +   CGroup: /system.slice/docker.service
 +           ├─16470 /usr/bin/dockerd -H fd://
 +           └─16496 containerd --config /var/run/docker/containerd/containerd.toml --log-level info
 +$
 </code> </code>
  
-Finally, you can test your installation with:+===== Testing installation =====
  
 <code> <code>
 $ sudo docker run hello-world $ sudo docker run hello-world
 +Unable to find image 'hello-world:latest' locally
 +latest: Pulling from library/hello-world
 +1b930d010525: Pull complete 
 +Digest: sha256:2557e3c07ed1e38f26e389462d03ed943586f744621577a99efb77324b0fe535
 +Status: Downloaded newer image for hello-world:latest
  
 Hello from Docker! Hello from Docker!
Line 177: Line 208:
  
 Share images, automate workflows, and more with a free Docker ID: Share images, automate workflows, and more with a free Docker ID:
- https://cloud.docker.com/+ https://hub.docker.com/
  
 For more examples and ideas, visit: For more examples and ideas, visit:
- https://docs.docker.com/engine/userguide/+ https://docs.docker.com/get-started/
 $ $
 </code> </code>
Line 206: Line 237:
 $ docker run hello-world $ docker run hello-world
 ... etc etc ... ... etc etc ...
 +</code>
 +
 +===== Running Ubuntu bash =====
 +
 +<code>
 +$ docker run -it ubuntu bash
 +Unable to find image 'ubuntu:latest' locally
 +latest: Pulling from library/ubuntu
 +38e2e6cd5626: Pull complete 
 +705054bc3f5b: Pull complete 
 +c7051e069564: Pull complete 
 +7308e914506c: Pull complete 
 +Digest: sha256:945039273a7b927869a07b375dc3148de16865de44dec8398672977e050a072e
 +Status: Downloaded newer image for ubuntu:latest
 +root@f7c76c6f0ee4:/# id
 +uid=0(root) gid=0(root) groups=0(root)
 +root@f7c76c6f0ee4:/# 
 +</code>
 +
 +From another session:
 +
 +<code>
 +# docker ps
 +CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
 +f7c76c6f0ee4        ubuntu              "bash"              25 seconds ago      Up 22 seconds                           nifty_spence
 </code> </code>
  • docker_installation_on_fedora.1548326703.txt.gz
  • Last modified: 2019/01/24 10:45
  • by rpjday