

Lesson 06 · 10 min
Docker in the terminal: run, logs, exec
A dozen commands you use every day, and what they really do.
10 minLesson 6 of 9Practice includedAsk AI on any point
docker run creates a container from an image and starts it. -d runs it in the background, -p 8080:3000 maps the machine's port 8080 to the container's port 3000, -e or --env-file set environment variables, --name gives a name instead of a random one. docker ps lists running containers, docker logs -f shows their output, docker exec -it … sh opens a shell inside a running container.
Sign in to continue
The rest of this lesson opens after sign up
The first lesson of every course is open without an account. To read on, solve the practice and use Ask, create a free account or log in.