Docker

From Bitnami MediaWiki
Revision as of 02:43, 31 January 2021 by User (talk | contribs) (Created page with "1. Install docker from repos $ sudo apt-get install docker-ce docker-ce-cli containerd.io 2. Run the hello-world docker container $ sudo docker run hello-world Unable to fi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

1. Install docker from repos

$ sudo apt-get install docker-ce docker-ce-cli containerd.io

2. Run the hello-world docker container

$ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
0e03bdcc26d7: Pull complete 
Digest: sha256:31b9c7d48790f0d8c50ab433d9c3b7e17666d6993084c002c2ff1ca09b96391d
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


xxx@xxxbox:~$ sudo docker pull mysql/mysql-server:8.0
[sudo] password for xxx: 
8.0: Pulling from mysql/mysql-server
501550cfd5c0: Pull complete 
e0509d775110: Pull complete 
d5a01765d011: Pull complete 
970507e942eb: Pull complete 
Digest: sha256:0bb21c0f1aa9296e7deafacec5703b80e4d923dfdfcaa2efbe0c8377a8592128
Status: Downloaded newer image for mysql/mysql-server:8.0
docker.io/mysql/mysql-server:8.0