relay:
  image: local/tor-server
  restart: always
  ports:
    - "9001:9001"
    #- "9030:9030"
    #- "54444:54444"
  environment:
    ## set your Nickname here (only use letters and numbers)
    TOR_NICKNAME: Tor4
    ## an email address to contact you
    #CONTACT_EMAIL: email@example.org
  #volumes:
    ## mount custom torrc / secret_id_key here
    #- ./torrc:/etc/tor/torrc
    #- ./secret_id_key:/var/lib/tor/keys/secret_id_key
  log_opt:
      max-size: "512k"
      max-file: "20"

relay:
  image: chriswayg/tor-server
  restart: always
  ports:
    - "9001:9001"
    #- "9030:9030"
    #- "54444:54444"
  environment:
    ## set your Nickname here (only use letters and numbers)
    TOR_NICKNAME: Tor4
    ## an email address to contact you
    #CONTACT_EMAIL: email@example.org
  #volumes:
    ## mount custom torrc / secret_id_key here
    #- ./torrc:/etc/tor/torrc
    #- ./secret_id_key:/var/lib/tor/keys/secret_id_key
  log_opt:
      max-size: "512k"
      max-file: "20"

Use image from Docker hub
Use image from Docker hub

