1. Start a container
docker run creates and starts a container from the nginx image as an isolated process.
docker run -d -p 8080:80 --name web nginxTyporithm · easy
Step 1 of 8 · intro card
Containers
docker run starts a container from an image: -d detaches it, -p maps host:container ports, and --name labels it. docker ps lists running containers, docker logs -f streams output, and docker exec -it opens an interactive shell inside.
A container is an isolated process created from an image. docker run starts one: -d detaches it to the background, -p 8080:80 maps a host port to the container's port, and --name gives it a stable label.
docker ps lists the containers currently running, showing their image, ports, and names. Add -a to also see stopped ones.
docker logs -f web streams a container's stdout/stderr as it runs, and docker exec -it web sh drops you into an interactive shell inside the live container to inspect it.
docker run starts a container from an image.
-d detaches; -p maps host:container ports; --name labels it.
ps lists, logs -f streams, exec -it shells in.
docker run -d -p 8080:80 --name web nginx
docker ps
docker logs -f web
docker exec -it web shConnect each part of the code to the concept before you type.
docker run creates and starts a container from the nginx image as an isolated process.
docker run -d -p 8080:80 --name web nginx-d runs the container in the background and returns the prompt immediately.
-d-p maps host port 8080 to container port 80 so traffic reaches the app inside.
-p 8080:80docker ps lists the currently running containers with their ports and names.
docker psdocker exec -it opens an interactive shell inside the already-running container.
docker exec -it web shRead the concept map and follow the code breakdown.
Type the implementation, repair mistakes and work through every recall exercise.
Use the final check without hints; revisit weak concepts in short practice sessions.