From 98584d8935906d47f910395e813d384bae2b76fc61cf6e1f173ffda3af41ff3d Mon Sep 17 00:00:00 2001 From: Jordi Massaguer Date: Thu, 7 Feb 2019 09:04:01 +0000 Subject: [PATCH] Accepting request 672170 from home:mjura:branches:Virtualization:containers - Add daemon.json file with rotation logs cofiguration, bsc#1114832 OBS-URL: https://build.opensuse.org/request/show/672170 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/docker?expand=0&rev=284 --- docker-daemon.json | 8 ++++++++ docker.changes | 5 +++++ docker.spec | 5 +++++ 3 files changed, 18 insertions(+) create mode 100644 docker-daemon.json diff --git a/docker-daemon.json b/docker-daemon.json new file mode 100644 index 0000000..3661a83 --- /dev/null +++ b/docker-daemon.json @@ -0,0 +1,8 @@ +{ + "log-level": "warn", + "log-driver": "json-file", + "log-opts": { + "max-size": "10m", + "max-file": "5" + } +} diff --git a/docker.changes b/docker.changes index a5633c0..248aa08 100644 --- a/docker.changes +++ b/docker.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Feb 6 14:37:43 UTC 2019 - Michal Jura + +- Add daemon.json file with rotation logs cofiguration, bsc#1114832 + ------------------------------------------------------------------- Tue Feb 5 11:24:02 UTC 2019 - Aleksa Sarai diff --git a/docker.spec b/docker.spec index f386b11..fd3cd1a 100644 --- a/docker.spec +++ b/docker.spec @@ -70,6 +70,7 @@ Source6: docker-rpmlintrc Source7: README_SUSE.md Source8: docker-audit.rules Source9: tests.sh +Source10: docker-daemon.json # SUSE-FEATURE: Adds the /run/secrets mountpoint inside all Docker containers # which is not snapshotted when images are committed. Note that if you modify # this patch, please also modify the patch in the suse-secrets-v @@ -402,6 +403,9 @@ install -D -m 0640 %{SOURCE8} %{buildroot}%{_sysconfdir}/audit/rules.d/%{realnam # sysconfig file install -D -m 644 %{SOURCE4} %{buildroot}%{_fillupdir}/sysconfig.docker +# install docker config file +install -D -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/daemon.json + # install manpages (using the ones from the engine) install -d %{buildroot}%{_mandir}/man1 install -p -m 644 components/cli/man/man1/*.1 %{buildroot}%{_mandir}/man1 @@ -459,6 +463,7 @@ getent group docker >/dev/null || groupadd -r docker %dir %{_unitdir}/%{realname}.service.d/ %{_unitdir}/%{realname}.service.d/90-kubic.conf %endif +%config %{_sysconfdir}/daemon.json %config %{_sysconfdir}/audit/rules.d/%{realname}.rules %{_udevrulesdir}/80-%{realname}.rules %{_fillupdir}/sysconfig.docker