server:
  build: ./empire
  command: server -automigrate=true
  links:
    - postgres:postgres
  ports:
    - "8080:8080"
  volumes:
    - ~/.dockercfg:/root/.dockercfg
    - /var/lib/boot2docker/tls:/root/certs
  env_file: .env
  user: root
  environment:
    EMPIRE_DATABASE_URL: postgres://postgres:postgres@postgres/postgres?sslmode=disable
    DOCKER_HOST:
    DOCKER_CERT_PATH: /root/certs
postgres:
  image: postgres
  ports:
    - "5432:5432"

server:
  build: ./empire
  command: server -automigrate=true
  links:
    - postgres:postgres
  ports:
    - "8080:8080"
  volumes:
    - ~/.dockercfg:/root/.dockercfg
    - "$DOCKER_CERT_PATH:/root/certs:ro"
  env_file: .env
  user: root
  environment:
    EMPIRE_DATABASE_URL: postgres://postgres:postgres@postgres/postgres?sslmode=disable
    DOCKER_HOST:
    DOCKER_CERT_PATH: /root/certs
postgres:
  image: postgres
  ports:
    - "5432:5432"

Use the DOCKER_CERT_PATH env variable.
Use the DOCKER_CERT_PATH env variable.