TransWikia.com

Preset runtime parameters for a docker container

Server Fault Asked by ormfo4i5fm on November 4, 2021

Is there any way to define some default parameters for a docker container?
For example, I’d like to set up logging options (docker run ... --log-driver syslog --log-opt syslog-address=udp://logger:514 ...), but I’m sure, I’ll forget it when I issue docker run command, a few days later.
Can I define parameters like this, at build time?
Or do I need to create a startup script?

One Answer

To do it globally you can configure logging by creating /etc/docker/daemon.json and specyfing the log-driver value.

Documentation:

Configure the default logging driver

Answered by maar on November 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP