cli.fail

Practice this fail.

The container has a shell.

Docker · Restart as often as you like

Read the error, choose a command, and learn
why it works. Nothing runs on your machine.

Browse all practice ↗

Docker · Beginner

api is running and contains /bin/sh. Open an interactive shell inside it without starting another container or restarting the service.

The container has a shell.

$ docker ps

api Up 2 hours

How do you start an interactive sh session inside api?

3 attempts remaining

Read why this fix works

The container has a shell.

docker exec -it api sh

exec runs a new process inside a running container. -i keeps stdin open and -t allocates a pseudo-terminal. sh must exist in that image.

Practice rounds do not affect the daily score or local streak. Try today’s challenge, or choose another scenario.

Copy your result