Originally published on docker.learnio.dev — part of the Docker fundamentals course. View this lesson on the original site.

Pull an image, run it, prove it works

This is the same loop you used with nginx in chapter 1 — now named in image vocabulary.

See it

{
  "ariaLabel": "docker pull then docker run",
  "segments": [
    { "text": "docker", "bottomLabel": { "text": "CLI" } },
    { "text": "pull", "topLabel": { "text": "Command", "variant": "command" }, "highlight": "command" },
    { "text": "nginx:stable-alpine", "topLabel": { "text": "Tag", "variant": "tag" }, "highlight": "tag" }
  ]
}

GitHub example

Academy repo: 2-images-layers/nginx-pull-run

Try it

docker pull nginx:stable-alpine
docker run --rm -d --name ch2-smoke -p 127.0.0.1:8080:80 nginx:stable-alpine
curl -I http://127.0.0.1:8080
docker image ls nginx
docker stop ch2-smoke

If it goes wrong

  • pull hangs or fails: network, registry login, or rate limit.
  • curl fails while container is up: check port mapping and docker logs ch2-smoke.

Remember

Pull → run → curl is your default smoke test before blaming application code.

From Docker fundamentals — Images, layers, tags, and everyday commands