Skip to content

Commit

Permalink
disable docker by default
Browse files Browse the repository at this point in the history
Change-Id: I425a1f58f41ff3115ac5464c4f521cdf3533a35a
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3848
Reviewed-by: Sharath George
Tested-by: Sharath George
  • Loading branch information
ganboing authored and Sharath George committed Sep 22, 2017
1 parent 04c65b8 commit d620f33
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions SPECS/docker/default-disable.preset
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
disable docker.service
10 changes: 8 additions & 2 deletions SPECS/docker/docker.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Summary: Docker
Name: docker
Version: 17.06.0
Release: 3%{?dist}
Release: 4%{?dist}
License: ASL 2.0
URL: http://docs.docker.com
Group: Applications/File
Expand All @@ -25,6 +25,7 @@ Source4: https://github.com/krallin/tini/tree/tini-949e6fa.tar.gz
%define sha1 tini=e1a0e72ff74e1486e0701dd52983014777a7d949
Source5: https://github.com/cpuguy83/go-md2man/tree/go-md2man-a65d4d2.tar.gz
%define sha1 go-md2man=e3d0865c583150f7c76e385a8b4a3f2432ca8ad8
Source6: default-disable.preset
Patch0: remove-firewalld.patch

BuildRequires: systemd
Expand Down Expand Up @@ -171,14 +172,16 @@ for cli_file in LICENSE MAINTAINERS NOTICE README.md; do
cp "cli/$cli_file" "build-docs/cli-$cli_file"
done

install -v -D -m 0644 %{SOURCE6} %{buildroot}%{_presetdir}/50-docker.preset

%preun
%systemd_preun docker.service

%post
%systemd_post docker.service
if [ $1 -eq 1 ] ; then
getent group docker >/dev/null || groupadd -r docker
fi
%systemd_post docker.service

%postun
%systemd_postun_with_restart docker.service
Expand All @@ -193,6 +196,7 @@ rm -rf %{buildroot}/*
%files
%defattr(-,root,root)
%{_unitdir}/docker.service
%{_presetdir}/50-docker.preset
%{_bindir}/docker
%{_bindir}/dockerd
%{_bindir}/docker-containerd
Expand All @@ -216,6 +220,8 @@ rm -rf %{buildroot}/*
%{_datadir}/vim/vimfiles/syntax/dockerfile.vim

%changelog
* Fri Sep 22 2017 Bo Gan <[email protected]> 17.06.0-4
- disable docker service by default
* Fri Sep 08 2017 Bo Gan <[email protected]> 17.06.0-3
- Fix post scriptlet to invoke systemd_post
* Mon Aug 28 2017 Alexey Makhalov <[email protected]> 17.06.0-2
Expand Down

0 comments on commit d620f33

Please sign in to comment.