latest: Pulling from library/hello-world
1b930d010525: Pull complete
Digest: sha256:6540fc08ee6e6b7b63468dc3317e3303aae178cb8a45ed3123180328bcc1d20f
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/
unbound2 is a lightweight dns server supporting dns-over-tls(DoT). This example use alpine linux as base and install unbound using package manager to install unbound within the container.
You can inspect the Dockerfile to see how it is done. More details of Dockerfile can be found at DockerFile reference3.
List docker images:
1
docker images
Output:
1
2
3
4
REPOSITORY TAG IMAGE ID CREATED SIZE
unbound latest aa13f9e6d595 8 minutes ago 13.1MB
alpine latest b7b28af77ffe 4 weeks ago 5.58MB
hello-world latest fce289e99eb9 7 months ago 1.84kB
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
260ee2c31f37 unbound "unbound -d"33 seconds ago Up 31 seconds 0.0.0.0:53->53/tcp, 0.0.0.0:53->53/udp brave_feistel