Browse Source

Merge pull request #17497 from corna/dockerd_log_driver

dockerd: Add "log-driver" option
lilik-openwrt-22.03
Florian Eckert 3 years ago
committed by GitHub
parent
commit
ea567e3c7c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions
  1. +2
    -0
      utils/dockerd/files/dockerd.init
  2. +2
    -0
      utils/dockerd/files/etc/config/dockerd

+ 2
- 0
utils/dockerd/files/dockerd.init View File

@ -175,6 +175,7 @@ process_config() {
# Don't add these options by default # Don't add these options by default
# omission == docker defaults # omission == docker defaults
config_get log_driver globals log_driver ""
config_get bip globals bip "" config_get bip globals bip ""
config_get registry_mirrors globals registry_mirrors "" config_get registry_mirrors globals registry_mirrors ""
config_get hosts globals hosts "" config_get hosts globals hosts ""
@ -189,6 +190,7 @@ process_config() {
json_add_string "data-root" "${data_root}" json_add_string "data-root" "${data_root}"
json_add_string "log-level" "${log_level}" json_add_string "log-level" "${log_level}"
json_add_boolean "iptables" "${iptables}" json_add_boolean "iptables" "${iptables}"
[ -z "${log_driver}" ] || json_add_string "log-driver" "${log_driver}"
[ -z "${bip}" ] || json_add_string "bip" "${bip}" [ -z "${bip}" ] || json_add_string "bip" "${bip}"
[ -z "${registry_mirrors}" ] || json_add_array "registry-mirrors" [ -z "${registry_mirrors}" ] || json_add_array "registry-mirrors"
[ -z "${registry_mirrors}" ] || config_list_foreach globals registry_mirrors json_add_array_string [ -z "${registry_mirrors}" ] || config_list_foreach globals registry_mirrors json_add_array_string


+ 2
- 0
utils/dockerd/files/etc/config/dockerd View File

@ -1,4 +1,5 @@
# The following settings require a restart of docker to take full effect, A reload will only have partial or no effect: # The following settings require a restart of docker to take full effect, A reload will only have partial or no effect:
# log_driver
# bip # bip
# blocked_interfaces # blocked_interfaces
# extra_iptables_args # extra_iptables_args
@ -7,6 +8,7 @@
config globals 'globals' config globals 'globals'
# option alt_config_file '/etc/docker/daemon.json' # option alt_config_file '/etc/docker/daemon.json'
option data_root '/opt/docker/' option data_root '/opt/docker/'
# option log_driver 'local'
option log_level 'warn' option log_level 'warn'
option iptables '1' option iptables '1'
# list hosts 'unix:///var/run/docker.sock' # list hosts 'unix:///var/run/docker.sock'


Loading…
Cancel
Save