I have a docker that configures the database container, an application container and one container that preloads the database with the necessary data.
I want to start all containers along with docker-compose up , while the preload container ends after it exit 0 with exit 0 .
But the completion of this one container removes the full setup with the message:
composesetup_load_1 exited with code 0 Gracefully stopping... (press Ctrl+C again to force) Stopping composesetup_app_1... Stopping composesetup_db_1...
Is there a way to have multiple containers with different lifetimes in a single docker setup? If so, how?
docker docker-compose exit-code exit fig
white_gecko
source share