Docker Community Forums

Share and learn in the Docker community.

What is the standard pattern for exiting a docker image that runs a test suite?

What is the standard pattern for exiting an alpine docker image that runs a test suite?

I want to create a base docker image for runnning a test suite. After the commands run, what can the entrypoint script do to shut down the docker image? Do people use a standard halt or poweroff command or something OR is there a more graceful/intuitive way to do it?

Maybe it is just exit from the shell? I’ll try that, but hoping for a more exact answer here.

Hi

The container stops when the entrypoint script exit.
So, do your tests in the script and then just exit :slight_smile:

1 Like