I found some sample code to keep a docker build container running until it gets stopped. It uses
/bin/ash -c "trap : TERM INT; sleep infinity & wait"
as parameter.
Why is the ':' needed? Another stackoverflow mentions the colon is just used for side effects, but here I'd assume TERM INT is needed as a trap argument.