Using docker-compose to set containers timezones

Solution 1:

This is simple solution:

environment:
  - TZ=America/Denver

Solution 2:

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"

Edit: The question didn't ask for it but I've just added exec my-main-application to show how the main process would be specified. exec is important here to make sure that my-main-application receives Ctrl-C (SIGINT/SIGKILL).