Share & learn

Through Innovative Digital Library

How to run docker container with different logging driver

Currently our docker has been configured with SYSLOG logging, could you please suggest to change into json for one container.


Posted by Alex on February 1st 2018 20:55 PM

Please use below docker command to use different logging driver other than Docker daemon’s configuration file while running the container.

# docker container run -d --name spring --log-driver json-file httpd

# docker logs spring

# docker inspect spring | grep json

# tail -f /var/lib/docker/containers/3b437e37bf20bbef7364878920bbae7d3e651c046d18dcd4f6a686a4f1784f7e/3b437e37bf20bbef7364878920bbae7d3e651c046d18dcd4f6a686a4f1784f7e-json.log

Replied by Alex on February 1st 2018 20:57 PM

Answer Question

Your email address will not be published. Required fields are marked *

  • Minimum 20 character

related questions

Most liked questions

Most answered questions

1AK3 Refresh
1AK3 Refresh
Forgot password
Ask a Question
Minimum 20 character
Minimum 20 character
Minimum 20 character
1AK3 Refresh