[英]Docker: b'json: cannot unmarshal number into Go struct field LogConfig.Config of type string'
I configured my application in docker compose to use rotating logs, following the in the following site: https://medium.com/@Quigley_Ja/rotating-docker-logs-keeping-your-overlay-folder-small-40cfa2155412 我在docker compose中配置我的应用程序以使用旋转日志,遵循以下站点: https : //medium.com/@Quigley_Ja/rotating-docker-logs-keeping-your-overlay-folder-small-40cfa2155412
my-app:
image: my-app:latest
logging:
driver: "json-file"
options:
max-file: 5
max-size: 10m
But when I run the program now it cannot start with the following error: b'json: cannot unmarshal number into Go struct field LogConfig.Config of type string' 但是当我现在运行该程序时,它无法启动以下错误:b'json:无法将数字解组为Go结构字段LogConfig.Config类型为字符串'
Turns out I had to put " " around the values: 结果我不得不在值周围加上“”:
my-app:
image: my-app:latest
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.