version "2"services: serviceA: ... environment: TZ: "America/Denver" command: > sh -c "ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && exec my-main-application"
编辑:这个问题并没有要求,但我只是添加了它
exec my-main-application以显示将如何指定主要过程。
exec在此处确保
my-main-application接收Ctrl-C(SIGINT / SIGKILL)很重要。



