我想在docker compose yaml文件中设置一个用于设置日期的命令,这是我的docker-compose yaml文件的内容:
nms:
image: indeni-docker-private.jfrog.io/nms:$nmsVersion
ports:
- '161:1161/udp'
- '162:1162/udp'
volumes:
- '/tmp/nms:/home/indeni/nms/logs'
command: "--version=$version"
mock-device:
image: indeni-docker-private.jfrog.io/mock-device:$mockDeviceVersion
ports:
- '22:8022/tcp'
- '443:8443/tcp'
volumes:
- '/tmp:/home/indeni/mock_device/logs'
command: "--version=$version"
我想在“模拟设备”部分下添加用于设置日期的命令。
我知道这是我应该使用的命令:
volumes:
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"