Quiz Entry - updated: 2026.07.31
How do you create and run a Docker container?
Run an image by creating a container from it with docker create (mapping ports with -p), then launching it with docker start.
# Create container with port mapping
$ docker create -p 80:80 --name myweb myapp:latest
# Start the container
$ docker start myweb
Port mapping -p 80:80:
- First 80: host port (external access)
- Second 80: container port (internal)
The container is now accessible at http://localhost:80.
Go deeper:
docker run / container run (Docker CLI reference) — the full run command, including the
-pport-publishing flag.