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