robert
robert

Reputation: 857

stop container after finishing entrypoint script

I plan to start a separate container (via compose) which configures my mongodb replica set. After configuration (via entrypoint sh script) the container is not needed anymore. Whats the best way to kill/stop him from shell?

Upvotes: 1

Views: 1415

Answers (1)

Jamie Bisotti
Jamie Bisotti

Reputation: 2685

Whatever is launched first by the entrypoint command will be PID 1 in the Container. When PID 1 exits/stops, the Container will stop.

Good luck.

Upvotes: 2

Related Questions