SkillByAIOpen interactive version →

Lesson 5 / 28

Running a Container

Start containers with docker run in detached and interactive modes and see how missing images are pulled.

docker run basics

-d runs it in the background (detached), -it gives you an interactive terminal.

docker run -d nginx
docker run -it ubuntu bash   # interactive shell inside the container

pull happens automatically

If the image isn't local yet, docker run pulls it first automatically — you don't need a separate docker pull step.