fly.io /init docs part 2

For your first question, read this. I think that container control hasn’t landed in the TOML file format yet, so an API call with a JSON blob is required. I assume this will be added in the future. (I am guessing that containers will run inside a Firecracker VM, so Fly’s PID1 still runs, but then it runs Docker-in-Firecracker, which lets you have your own PID1 process).

For your second question, I think you’re focussing too much on the mechanics, and not enough on the problem. Containers would probably solve this, so that’s worth a go. Also, you could run s6 as a separate small machine (i.e. not use s6-overlay). Finally, if you want s6 to run in the same machine as your main process (e.g. a web server) then use S6 to start up other things. S6 doesn’t need to be PID1 to do that.

2 Likes