Why might Canton started from a Dockerfile automatically end after it has finished starting?

Hi all,

I’m trying to start up a little local Canton network through a dockerfile, with a very basic config and simple bootstrap file to upload the dar and create a few parties. I’ve now got Canton to start, but I get “Welcome to Canton!” immediately followed by “Bye!” and the container closes down!

Any advice would be greatly appreciated!

Thank you!

That sounds like you’re starting Canton in console mode and you’re not giving it a terminal (by passing -it to docker) so the console sees that the input is closed and dies.

For deployments like docker containers you usually want to pass daemon to Canton instead of starting it in console model.

Yeah, you’re on the right lines. I was running Canton with the “–no-tty” argument during debugging without fully realising the implications.

I removed “–no-tty” and ran the image by “docker run -t example-canton-app:Dockerfile” and now it’s fine.

Thanks!

1 Like