Noticed that the logging-driver and options are not included in the --format=pretty output for a service.
Create a service with a custom logging driver and -options set;
docker service create --log-driver=json-file --log-opt max-file=5 --name loggie nginx:alpine
Inspect the service in JSON format, and notice that the options are set:
docker service inspect --format='{{json .Spec.TaskTemplate.LogDriver}}' loggie
{"Name":"json-file","Options":{"max-file":"5"}}
Inspect the service using the "pretty-print" format, and notice that the logging options are missing:
docker service inspect --format=pretty loggie
ID: 243u3kmrhw62f5ja4gh0gf0mr
Name: loggie
Service Mode: Replicated
Replicas: 1
UpdateStatus:
State: completed
Started: 17 minutes ago
Completed: 17 minutes ago
Message: update completed
Placement:
UpdateConfig:
Parallelism: 1
On failure: pause
Monitoring Period: 5s
Max failure ratio: 0
Update order: stop-first
RollbackConfig:
Parallelism: 1
On failure: pause
Monitoring Period: 5s
Max failure ratio: 0
Rollback order: stop-first
ContainerSpec:
Image: nginx:alpine@sha256:366c39a589f69a893368d942d9d323893025e8c27a523657ba3a2119dfc66057
Init: false
Resources:
Endpoint Mode: vip
Noticed that the logging-driver and options are not included in the
--format=prettyoutput for a service.Create a service with a custom logging driver and -options set;
Inspect the service in JSON format, and notice that the options are set:
Inspect the service using the "pretty-print" format, and notice that the logging options are missing:
docker service inspect --format=pretty loggie ID: 243u3kmrhw62f5ja4gh0gf0mr Name: loggie Service Mode: Replicated Replicas: 1 UpdateStatus: State: completed Started: 17 minutes ago Completed: 17 minutes ago Message: update completed Placement: UpdateConfig: Parallelism: 1 On failure: pause Monitoring Period: 5s Max failure ratio: 0 Update order: stop-first RollbackConfig: Parallelism: 1 On failure: pause Monitoring Period: 5s Max failure ratio: 0 Rollback order: stop-first ContainerSpec: Image: nginx:alpine@sha256:366c39a589f69a893368d942d9d323893025e8c27a523657ba3a2119dfc66057 Init: false Resources: Endpoint Mode: vip