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.
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?
Fixed. By hand.
docker exec -it api shexec 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 does not affect your daily score or streak.