1 |
jcrisp |
1.1 |
%define name smeserver-docker |
2 |
|
|
%define version 0.4 |
3 |
jcrisp |
1.4 |
%define release 4%{?dist} |
4 |
jcrisp |
1.1 |
Summary: Contrib to manage basic docker setup |
5 |
|
|
Name: %{name} |
6 |
|
|
Version: %{version} |
7 |
|
|
Release: %{release} |
8 |
|
|
License: GNU GPL version 2 |
9 |
|
|
URL: http://www.docker.com/ |
10 |
|
|
Group: SMEserver/addon |
11 |
|
|
Source: %{name}-%{version}.tar.gz |
12 |
jcrisp |
1.2 |
Patch1: smeserver-docker-0.4-containerd-db-entry.patch |
13 |
jcrisp |
1.3 |
Patch2: smeserver-docker-0.4-update-createlinks1.patch |
14 |
jcrisp |
1.4 |
Patch3: smeserver-docker-0.4-docker-compose-template.patch |
15 |
jcrisp |
1.1 |
|
16 |
|
|
BuildRoot: /var/tmp/%{name}-%{version} |
17 |
|
|
BuildArchitectures: noarch |
18 |
|
|
BuildRequires: e-smith-devtools |
19 |
|
|
Requires: e-smith-release >= 10.0 |
20 |
|
|
Requires: docker-ce >= 20.10 |
21 |
|
|
AutoReqProv: no |
22 |
|
|
|
23 |
|
|
%description |
24 |
|
|
Docker is an open-source project that automates the deployment of applications inside software containers |
25 |
|
|
|
26 |
|
|
%changelog |
27 |
jcrisp |
1.4 |
* Wed Jul 13 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-4.sme |
28 |
|
|
- Add docker-compose.yml template |
29 |
|
|
- smeserver-docker-compose-update event to expand the compose file |
30 |
|
|
|
31 |
jcrisp |
1.3 |
* Tue Jul 12 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-3.sme |
32 |
|
|
- Fix some createlink errors [SME: 11892] |
33 |
|
|
- Update daemon.json and 50koozali.conf templates |
34 |
|
|
|
35 |
jcrisp |
1.2 |
* Thu Mar 10 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-2.sme |
36 |
jcrisp |
1.3 |
- Add containerd db entries [SME: 11892] |
37 |
jcrisp |
1.2 |
|
38 |
jcrisp |
1.1 |
* Thu Mar 10 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-1.sme |
39 |
|
|
- First import to Koozali SME Server v10 [SME: 11892] |
40 |
|
|
- Add basic templates |
41 |
|
|
|
42 |
|
|
* Fri Aug 17 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-1 |
43 |
|
|
- Add template directory for docker-compose.yml |
44 |
|
|
- You can then add gragments from your own contrib. |
45 |
|
|
|
46 |
|
|
* Sun Apr 08 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-5 |
47 |
|
|
- Missed a # in /etc/sysconfig/docker |
48 |
|
|
|
49 |
|
|
* Tue Mar 27 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-4 |
50 |
|
|
- Missed a # in the spec file |
51 |
|
|
|
52 |
|
|
* Thu Mar 15 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-3 |
53 |
|
|
- add rc.7 service links for docker and mongod |
54 |
|
|
- Fix prelink error on docker-compose see https://github.com/docker/compose/issues/ |
55 |
|
|
- fix errant semi colon in createlinks |
56 |
|
|
- move demo docker file out of configs so it doesn't overwrite originals |
57 |
|
|
|
58 |
|
|
* Sun Mar 11 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-2 |
59 |
|
|
- update spec file to set props on docker-compose |
60 |
|
|
- mover docker-compose to /usr/bin |
61 |
|
|
|
62 |
|
|
* Sun Mar 4 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-1 |
63 |
|
|
- initial release |
64 |
|
|
- basic file layout |
65 |
|
|
- removed httpd templates - need to create your own |
66 |
|
|
|
67 |
|
|
%prep |
68 |
|
|
%setup |
69 |
|
|
|
70 |
jcrisp |
1.2 |
%patch1 -p1 |
71 |
jcrisp |
1.3 |
%patch2 -p1 |
72 |
jcrisp |
1.4 |
%patch3 -p1 |
73 |
jcrisp |
1.1 |
|
74 |
|
|
%build |
75 |
|
|
perl createlinks |
76 |
|
|
|
77 |
|
|
%install |
78 |
|
|
rm -rf $RPM_BUILD_ROOT |
79 |
|
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
80 |
|
|
rm -f %{name}-%{version}-filelist |
81 |
|
|
|
82 |
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
83 |
|
|
echo "%doc COPYING LICENSE" >> %{name}-%{version}-filelist |
84 |
|
|
|
85 |
|
|
|
86 |
|
|
%clean |
87 |
|
|
cd .. |
88 |
|
|
rm -rf %{name}-%{version} |
89 |
|
|
|
90 |
|
|
%files -f %{name}-%{version}-filelist |
91 |
|
|
%defattr(-,root,root) |
92 |
|
|
|
93 |
|
|
%pre |
94 |
|
|
%preun |
95 |
|
|
%post |
96 |
|
|
|
97 |
jcrisp |
1.3 |
# Add config directories if they don't exist |
98 |
jcrisp |
1.1 |
if [[ ! -d /home/e-smith/files/docker/configs ]]; then |
99 |
jcrisp |
1.3 |
mkdir -p /home/e-smith/files/docker/configs; |
100 |
|
|
fi |
101 |
|
|
|
102 |
|
|
if [[ ! -d /usr/lib/systemd/system/docker.service.d ]]; then |
103 |
|
|
mkdir -p /usr/lib/systemd/system/docker.service.d; |
104 |
jcrisp |
1.1 |
fi |
105 |
|
|
|
106 |
jcrisp |
1.3 |
if [[ ! -d /etc/docker ]]; then |
107 |
|
|
mkdir -p /etc/docker; |
108 |
|
|
fi |
109 |
|
|
|
110 |
jcrisp |
1.4 |
# Remove the errant dir in the source |
111 |
|
|
if [[ -d /home/e-smith/files/docker/configs/docker-compose.yml ]]; then |
112 |
|
|
rm -rf /home/e-smith/files/docker/configs/docker-compose.yml; |
113 |
|
|
fi |
114 |
|
|
|
115 |
jcrisp |
1.3 |
|
116 |
jcrisp |
1.4 |
echo "" |
117 |
|
|
echo "###################################################" |
118 |
|
|
echo "*" |
119 |
jcrisp |
1.1 |
echo "see https://wiki.contribs.org/Docker" |
120 |
jcrisp |
1.4 |
echo "*" |
121 |
|
|
echo "###################################################" |
122 |
|
|
echo "" |
123 |
|
|
echo "###################################################" |
124 |
|
|
echo "*" |
125 |
jcrisp |
1.3 |
echo "Please run signal-post-upgrade;signal-event reboot" |
126 |
jcrisp |
1.4 |
echo "*" |
127 |
|
|
echo "###################################################" |
128 |
|
|
echo "" |
129 |
|
|
echo "###################################################" |
130 |
|
|
echo "*" |
131 |
|
|
echo "Docker compose:" |
132 |
|
|
echo "curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose" |
133 |
|
|
echo "chmod 0700 /usr/local/bin/docker-compose" |
134 |
|
|
echo "chgrp docker /usr/local/bin/docker-compose" |
135 |
|
|
echo "*" |
136 |
|
|
echo "###################################################" |
137 |
jcrisp |
1.1 |
|
138 |
|
|
%postun |
139 |
|
|
#/sbin/e-smith/expand-template /etc/rc.d/init.d/masq |
140 |
|
|
#/sbin/e-smith/expand-template /etc/inittab |
141 |
|
|
#/sbin/init q |