I have a docker compose service as this one.
version: "2.1"
services:
app:
container_name: 'my-demo'
image: 'my-demo'
volumes:
- ./config.json:/config.json
restart: always
logging:
options:
max-size: "1024m"
Every time the service crashed, it tried to restart the service as expected. Whenever I saw a restart, I tried to get the old logs to see what happened (crash logs...etc) to fix the root cause. However, the old, crash log was restarted/overridden as well. Is there anyway to persist the logs after restaring? For example: new log name/tag for every restart?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744720851a4589900.html
评论列表(0条)