GNU/Linux >> Linux Esercitazione >  >> Panels >> Docker

Installazione Docker su RHEL 7 Linux

Obiettivo

L'obiettivo è installare il motore Docker su Redhat 7 Linux utilizzando lo script docker nativo.

Requisiti

È richiesta una connessione Internet e un accesso privilegiato al tuo Redhat 7 Linux.

Difficoltà

FACILE

Convenzioni

  • # – richiede che i comandi linux dati vengano eseguiti con i privilegi di root direttamente come utente root o usando sudo comando
  • $ – richiede che i comandi linux dati vengano eseguiti come un normale utente non privilegiato

Istruzioni

Installa finestra mobile

L'installazione della finestra mobile utilizzando uno script nativo della finestra mobile è un comando, un processo semplice. Prima di eseguire il comando di installazione della finestra mobile sottostante, assicurati che curl pacchetto è installato sul tuo sistema:

# curl --version
curl 7.29.0 (x86_64-redhat-linux-gnu)

Una volta pronto, installa la finestra mobile usando curl comando che scaricherà ed eseguirà uno script di installazione della finestra mobile nativo:

# curl -sSL https://get.docker.com/ | sh
+ sh -c 'sleep 3; yum -y -q install docker-engine'
warning: /var/cache/yum/x86_64/7Server/docker-main-repo/packages/docker-engine-1.12.3-1.el7.centos.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 2c52609d: NOKEY
Importing GPG key 0x2C52609D:
 Userid     : "Docker Release Tool (releasedocker) "
 Fingerprint: 5811 8e89 f3a9 1289 7c07 0adb f762 2157 2c52 609d
 From       : https://yum.dockerproject.org/gpg
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:

  sudo usermod -aG docker your-user

Remember that you will have to log out and back in for this to take effect!

Abilita e avvia la finestra mobile

Per consentire l'avvio della finestra mobile sul tuo Redhat 7 Linux dopo il riavvio, esegui il seguente comando linux:

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

Per avviare l'esecuzione del demone Docker:

# systemctl start docker

Test

Per testare l'installazione della finestra mobile, esegui:

# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c04b14da8d14: Pull complete 
Digest: sha256:0256e8a36e2070f7bf2d0b0763dbabdd67798512411de4cdcf9431a1feb60fd9
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

Puoi elencare il tuo nuovo contenitore con:

# docker ps -a

Docker
  1. Installazione di PIP lo strumento di packaging Python su RHEL 7 Linux

  2. Installazione di php-mbstring mancante su RHEL 7 Linux

  3. Installazione e revisione di Linux Mint 18.3

  4. Come installare la finestra mobile su CentOS / RHEL / Fedora

  5. L'installazione di Docker su Linux Mint 19.2 non funziona

20 utili esempi di comandi Docker in Linux

Come installare Docker su Rocky Linux 8 / CentOS 8 / RHEL 8 / AlmaLinux

Introduzione a Docker Compose in Linux

Come configurare MySQL con Docker in Linux

Come installare Docker CE in Linux Mint 20

Distribuire un'installazione di MariaDB di Production Docker