sudo apt-get update
sudo apt-get install
apt-transport-https
ca-certificates
curl
gnupg-agent
software-properties-common
sudo add-apt-repository
"deb [arch=amd64] https://download.docker.com/linux/ubuntu
$(lsb_release -cs)
stable"
sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo docker run hello-world
latest: Pulling from library/hello-world
0e03bdcc26d7: Pull complete
Digest: sha256:49a1c8800c94df04e9658809b006fd8a686cab8028d33cfba2cc
049724254202
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:
The Docker client contacted the Docker daemon.
The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64)
The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading.
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/
adduser USUARIO
usermod -aG sudo USUARIO
usermod -aG docker USUARIO
su USUARIO
sudo docker run hello-world
docker pull ubuntu
docker run ubuntu
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5eb116713b8b ubuntu "/bin/bash" 31 minutes ago Up 24 seconds
hopeful_babbage
docker start 5eb116713b8b
docker attach 5eb116713b8b
[email protected]:/# apt update && apt upgrade
[email protected]:/# exit
docker run -p 8888:80 wordpress
Unable to find image 'wordpress:latest' locally
latest: Pulling from library/wordpress
a409b57eb464: Pull complete
Digest: sha256:6da8f886b20632dd05eeb22462f850a38e30600cedd894d2c6b1eb1a58e9763c
Status: Downloaded newer image for wordpress:latest
WordPress not found in /var/www/html - copying now...
Complete! WordPress has been successfully copied to /var/www/html
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
[Thu Aug 20 19:10:04.642828 2020] [mpm_prefork:notice] [pid 1]
AH00163: Apache/2.4.38 (Debian) PHP/7.4.9 configured -- resuming normal operations
[Thu Aug 20 19:10:04.642877 2020] [core:notice] [pid 1] AH00094:
Command line: 'apache2 -D FOREGROUND'