]> git.pld-linux.org Git - packages/docker-ce.git/blame - docker-ce.spec
up to v17.03.2-ce-rc1
[packages/docker-ce.git] / docker-ce.spec
CommitLineData
a73bca1d
ER
1#
2# Conditional build:
3%bcond_with tests # build without tests
de893b83 4%bcond_with vim # build vim syntax package (bundled in vim 7.4.979-2)
b317146a 5%bcond_with doc # build manual pages
b2c07037 6
be6486fd
ER
7# NOTES
8# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies
9
8716e3f7
ER
10# v1.0.0-rc2-136-g54296cf4
11%define runc_commit 54296cf
12# v0.2.6
13%define containerd_commit 4ab9917
a75f03e6
ER
14# v0.8.0-dev.2-464-g0f53435
15%define libnetwork_commit 0f53435
23955a7a 16%define subver -rc1
8716e3f7
ER
17Summary: Docker CE: the open-source application container engine
18Name: docker-ce
19# Using Docker-CE, Stay on Stable channel
20# https://docs.docker.com/engine/installation/
23955a7a 21Version: 17.03.2
8716e3f7 22Release: 0.1
b877f7b7
ER
23License: Apache v2.0
24Group: Applications/System
2e523ef0 25# https://github.com/docker/docker/releases
23955a7a
ER
26Source0: https://github.com/docker/docker/archive/v%{version}-ce%{subver}/%{name}-%{version}-ce%{subver}.tar.gz
27# Source0-md5: 4434d6891814a02f1e7f3879fa85cc65
7c769496 28Source1: https://github.com/docker/runc/archive/%{runc_commit}/runc-%{runc_commit}.tar.gz
8716e3f7 29# Source1-md5: c4eff71ea7da80d25f7cece171683a03
36f21c65 30Source2: https://github.com/docker/containerd/archive/%{containerd_commit}/containerd-%{containerd_commit}.tar.gz
8716e3f7 31# Source2-md5: 37dae1d17f530c2c7f7a35d3bf0977a4
a75f03e6
ER
32Source3: https://github.com/docker/libnetwork/archive/%{libnetwork_commit}/libnetwork-%{libnetwork_commit}.tar.gz
33# Source3-md5: 7cfbfe76355aae3577c77a6a4b2c92db
b96d9f58
ER
34Source4: https://github.com/krallin/tini/archive/v0.13.0/tini-0.13.0.tar.gz
35# Source4-md5: c29541112a242c53c82bb6b1213f288f
8716e3f7
ER
36Source5: dockerd.sh
37Source7: docker.init
38Source8: docker.sysconfig
b6f967da 39Patch0: systemd.patch
8716e3f7 40URL: https://www.docker.com/community-edition/
be6486fd 41BuildRequires: btrfs-progs-devel >= 3.16.1
6dee0436 42BuildRequires: cmake
be6486fd 43BuildRequires: device-mapper-devel >= 2.02.89
d9a3d699 44BuildRequires: golang >= 1.6
be6486fd 45BuildRequires: libseccomp-devel >= 2.2.1
0be68701 46BuildRequires: rpmbuild(macros) >= 1.644
678a84bd 47BuildRequires: sqlite3-devel >= 3.7.9
d88043a2
ER
48Requires(post,preun): /sbin/chkconfig
49Requires(postun): /usr/sbin/groupdel
50Requires(pre): /usr/bin/getgid
51Requires(pre): /usr/sbin/groupadd
27e7cc0f 52Requires: ca-certificates
2e42e913 53Requires: iproute2 >= 3.5
b5920dfc 54Requires: iptables
345101bd 55Requires: rc-scripts >= 0.4.0.10
0be68701 56Requires: systemd-units >= 38
2e42e913 57Requires: tar >= 1:1.26
2015cb19 58Requires: uname(release) >= 3.8
db150373 59Requires: xz
65777843 60Suggests: docker-credential-helpers
2e42e913 61Suggests: git-core >= 1.7
46a6d8ab 62Suggests: libcgroup
2e42e913 63Suggests: xz >= 1:4.9
d88043a2 64Provides: group(docker)
23955a7a 65Obsoletes: docker < 17.0
47009a45 66Obsoletes: lxc-docker < 1.1.1
d2670441 67# only runs on x64 hosts for now:
f4565fa4
ER
68# https://github.com/docker/docker/issues/136
69# https://github.com/docker/docker/issues/611
345101bd 70ExclusiveArch: %{x8664}
b877f7b7
ER
71BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
72
8c352669 73%define bash_compdir %{_datadir}/bash-completion/completions
a6da47b4 74%define zsh_compdir %{_datadir}/zsh/site-functions
f891ae41 75%define _vimdatadir %{_datadir}/vim
a990be6d 76%define _libexecdir %{_prefix}/lib
8c352669 77
434d66d3
ER
78# binary stripped or something
79%define _enable_debug_packages 0
80
b877f7b7 81%description
f4565fa4
ER
82Docker is an open source project to pack, ship and run any application
83as a lightweight container
84
85Docker containers are both hardware-agnostic and platform-agnostic.
86This means that they can run anywhere, from your laptop to the largest
87EC2 compute instance and everything in between - and they don't
88require that you use a particular language, framework or packaging
89system. That makes them great building blocks for deploying and
90scaling web apps, databases and backend services without depending on
91a particular stack or provider.
92
93Docker is an open-source implementation of the deployment engine which
94powers dotCloud, a popular Platform-as-a-Service. It benefits directly
95from the experience accumulated over several years of large-scale
96operation and support of hundreds of thousands of applications and
97databases.
b877f7b7 98
f891ae41 99%package -n bash-completion-%{name}
8c352669
ER
100Summary: bash-completion for Docker
101Summary(pl.UTF-8): bashowe uzupełnianie nazw dla Dockera
102Group: Applications/Shells
103Requires: %{name}
104Requires: bash-completion >= 2.0
47009a45 105Obsoletes: bash-completion-lxc-docker < 1.1.1
8c352669
ER
106%if "%{_rpmversion}" >= "5"
107BuildArch: noarch
108%endif
109
47009a45 110%description -n bash-completion-%{name}
8c352669
ER
111This package provides bash-completion for Docker.
112
47009a45 113%description -n bash-completion-%{name} -l pl.UTF-8
8c352669
ER
114Pakiet ten dostarcza bashowe uzupełnianie nazw dla Dockera.
115
a6da47b4
JK
116%package -n zsh-completion-%{name}
117Summary: zsh completion for Docker
118Summary(pl.UTF-8): Uzupełnianie parametrów w zsh dla poleceń Dockera
119Group: Applications/Shells
120Requires: %{name}
121%if "%{_rpmversion}" >= "5"
122BuildArch: noarch
123%endif
124
125%description -n zsh-completion-%{name}
126This package provides zsh completion for Docker.
127
128%description -n zsh-completion-%{name} -l pl.UTF-8
129Pakiet ten dostarcza uzupełnianie w zsh dla poleceń Dockera.
130
f891ae41
ER
131%package -n vim-syntax-%{name}
132Summary: Vim syntax: Docker
133Group: Applications/Editors/Vim
134Requires: %{name} = %{version}-%{release}
135Requires: vim-rt >= 4:7.2.170
47009a45 136Obsoletes: vim-syntax-lxc-docker < 1.1.1
f891ae41
ER
137%if "%{_rpmversion}" >= "5"
138BuildArch: noarch
139%endif
140
141%description -n vim-syntax-%{name}
142This plugin provides syntax highlighting in Dockerfile.
143
b877f7b7 144%prep
23955a7a 145%setup -q -n moby-%{version}-ce%{?subver} -a1 -a2 -a3 -a4
36f21c65
ER
146mv runc-%{runc_commit}* runc
147mv containerd-%{containerd_commit}* containerd
a75f03e6 148mv libnetwork-%{libnetwork_commit}* libnetwork
b96d9f58 149mv tini-* tini
b6f967da 150%patch0 -p1
36f21c65 151
f4565fa4
ER
152install -d vendor/src/github.com/docker
153ln -s $(pwd) vendor/src/github.com/docker/docker
36f21c65 154ln -s $(pwd)/containerd containerd/vendor/src/github.com/docker/containerd
a75f03e6 155ln -s $(pwd)/libnetwork vendor/src/github.com/docker/libnetwork
b877f7b7 156
692548c0 157%build
440e6b79 158v=$(awk -F= '/^RUNC_COMMIT/ {print $2}' hack/dockerfile/binaries-commits)
36f21c65 159echo "$v" | grep "^%{runc_commit}"
440e6b79 160v=$(awk -F= '/^CONTAINERD_COMMIT/ {print $2}' hack/dockerfile/binaries-commits)
36f21c65 161echo "$v" | grep "^%{containerd_commit}"
440e6b79 162v=$(awk -F= '/^LIBNETWORK_COMMIT/ {print $2}' hack/dockerfile/binaries-commits)
a75f03e6 163echo "$v" | grep "^%{libnetwork_commit}"
36f21c65
ER
164
165export GOPATH=$(pwd)/vendor:$(pwd)/containerd/vendor
e4252f76 166export DOCKER_GITCOMMIT="pld/%{version}"
36f21c65
ER
167# build docker-runc
168%{__make} -C runc
169
170# build docker-containerd
171%{__make} -C containerd
172
a75f03e6 173# build docker-proxy
07732609 174go build -ldflags="-linkmode=external" \
a75f03e6
ER
175 -o docker-proxy \
176 github.com/docker/libnetwork/cmd/proxy
177
b96d9f58
ER
178# build docker-init
179cd tini
7397034b 180cmake .
b96d9f58
ER
181%{__make}
182cd ..
183
90544b12 184bash -x hack/make.sh dynbinary
b317146a
ER
185%if %{with doc}
186man/md2man-all.sh
187%endif
a73bca1d 188
b877f7b7
ER
189%install
190rm -rf $RPM_BUILD_ROOT
36f21c65 191install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man1,/etc/{rc.d/init.d,sysconfig},%{systemdunitdir}} \
a990be6d 192 $RPM_BUILD_ROOT%{_libexecdir} \
7b3be108 193 $RPM_BUILD_ROOT/var/lib/docker/{containers,execdriver,graph,image,init,network,swarm,tmp,trust,vfs,volumes}
e4252f76 194
8716e3f7
ER
195install -p bundles/latest/dynbinary-client/docker $RPM_BUILD_ROOT%{_bindir}/docker
196install -p bundles/latest/dynbinary-daemon/dockerd $RPM_BUILD_ROOT%{_sbindir}/dockerd
36f21c65
ER
197
198# install docker-runc
199install -p runc/runc $RPM_BUILD_ROOT%{_sbindir}/docker-runc
200
201# install docker-containerd
202install -p containerd/bin/containerd $RPM_BUILD_ROOT%{_sbindir}/docker-containerd
203install -p containerd/bin/containerd-shim $RPM_BUILD_ROOT%{_sbindir}/docker-containerd-shim
6a5abe01 204install -p containerd/bin/ctr $RPM_BUILD_ROOT%{_sbindir}/docker-containerd-ctr
36f21c65 205
a75f03e6
ER
206# install docker-proxy
207install -p docker-proxy $RPM_BUILD_ROOT%{_sbindir}/docker-proxy
208
b96d9f58
ER
209# install docker-init
210install -p tini/tini $RPM_BUILD_ROOT%{_sbindir}/docker-init
211
b6f967da
ER
212cp -p contrib/init/systemd/docker.service $RPM_BUILD_ROOT%{systemdunitdir}
213cp -p contrib/init/systemd/docker.socket $RPM_BUILD_ROOT%{systemdunitdir}
5fcaa458 214install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/docker
b96d9f58 215install -p %{SOURCE5} $RPM_BUILD_ROOT%{_libexecdir}/dockerd
5fcaa458 216cp -p %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/docker
b877f7b7 217
e4252f76
ER
218# install udev rules
219install -d $RPM_BUILD_ROOT/lib/udev/rules.d
220cp -p contrib/udev/80-docker.rules $RPM_BUILD_ROOT/lib/udev/rules.d
221
a6da47b4 222# bash and zsh completion
8c352669 223install -d $RPM_BUILD_ROOT%{bash_compdir}
47009a45 224cp -p contrib/completion/bash/docker $RPM_BUILD_ROOT%{bash_compdir}/docker
a6da47b4
JK
225install -d $RPM_BUILD_ROOT%{zsh_compdir}
226cp -p contrib/completion/zsh/_docker $RPM_BUILD_ROOT%{zsh_compdir}
8c352669 227
f891ae41 228# vim syntax
c590f8e8 229%if %{with vim}
f891ae41 230install -d $RPM_BUILD_ROOT%{_vimdatadir}
7db50491 231cp -a contrib/syntax/vim/* $RPM_BUILD_ROOT%{_vimdatadir}
f891ae41 232%{__rm} $RPM_BUILD_ROOT%{_vimdatadir}/{LICENSE,README.md}
c590f8e8 233%endif
f891ae41 234
d88043a2
ER
235%pre
236%groupadd -g 296 docker
237
345101bd 238%post
8716e3f7
ER
239/sbin/chkconfig --add docker
240%service -n docker restart
241%systemd_post docker.service
345101bd
ER
242
243%preun
244if [ "$1" = "0" ]; then
8716e3f7
ER
245 %service -q docker stop
246 /sbin/chkconfig --del docker
345101bd 247fi
8716e3f7 248%systemd_preun docker.service
345101bd 249
d88043a2
ER
250%postun
251if [ "$1" = "0" ]; then
252 %groupremove docker
253fi
2e523ef0 254%systemd_reload
d88043a2 255
b877f7b7
ER
256%clean
257rm -rf $RPM_BUILD_ROOT
258
259%files
260%defattr(644,root,root,755)
f4565fa4 261%doc README.md CHANGELOG.md CONTRIBUTING.md LICENSE AUTHORS NOTICE MAINTAINERS
62b620a7 262%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/docker
47009a45 263%attr(754,root,root) /etc/rc.d/init.d/docker
9c77b76c 264%attr(755,root,root) %{_bindir}/docker
36f21c65 265%attr(755,root,root) %{_sbindir}/docker-containerd
6a5abe01 266%attr(755,root,root) %{_sbindir}/docker-containerd-ctr
36f21c65 267%attr(755,root,root) %{_sbindir}/docker-containerd-shim
b96d9f58 268%attr(755,root,root) %{_sbindir}/docker-init
4467217c
ER
269%attr(755,root,root) %{_sbindir}/docker-proxy
270%attr(755,root,root) %{_sbindir}/docker-runc
271%attr(755,root,root) %{_sbindir}/dockerd
29baba5b 272%attr(755,root,root) %{_libexecdir}/dockerd
62b620a7 273%{systemdunitdir}/docker.service
5fcaa458 274%{systemdunitdir}/docker.socket
e4252f76 275/lib/udev/rules.d/80-docker.rules
36f21c65 276
af991618
ER
277%dir %attr(700,root,root) /var/lib/docker
278%dir %attr(700,root,root) /var/lib/docker/containers
b73b275e 279%dir %attr(700,root,root) /var/lib/docker/execdriver
af991618 280%dir %attr(700,root,root) /var/lib/docker/graph
841676f2 281%dir %attr(700,root,root) /var/lib/docker/image
b73b275e 282%dir %attr(700,root,root) /var/lib/docker/init
841676f2 283%dir %attr(700,root,root) /var/lib/docker/network
7b3be108 284%dir %attr(700,root,root) /var/lib/docker/swarm
b73b275e
ER
285%dir %attr(700,root,root) /var/lib/docker/tmp
286%dir %attr(700,root,root) /var/lib/docker/trust
287%dir %attr(700,root,root) /var/lib/docker/vfs
af991618 288%dir %attr(700,root,root) /var/lib/docker/volumes
8c352669 289
f891ae41 290%files -n bash-completion-%{name}
8c352669 291%defattr(644,root,root,755)
8c352669 292%{bash_compdir}/docker
f891ae41 293
a6da47b4
JK
294%files -n zsh-completion-%{name}
295%defattr(644,root,root,755)
296%{zsh_compdir}/_docker
297
c590f8e8 298%if %{with vim}
f891ae41
ER
299%files -n vim-syntax-%{name}
300%defattr(644,root,root,755)
7db50491 301%doc contrib/syntax/vim/{README.md,LICENSE}
f891ae41
ER
302%{_vimdatadir}/doc/dockerfile.txt
303%{_vimdatadir}/ftdetect/dockerfile.vim
304%{_vimdatadir}/syntax/dockerfile.vim
c590f8e8 305%endif
This page took 0.127448 seconds and 4 git commands to generate.