Add podman-docker support
Force cgroupfs for non root podman
This commit is contained in:
parent
9e9e79b4a7
commit
ade04f557a
40
podman.spec
40
podman.spec
@ -36,11 +36,12 @@ Name: podman
|
|||||||
Epoch: 1
|
Epoch: 1
|
||||||
%endif
|
%endif
|
||||||
Version: 0.8.3
|
Version: 0.8.3
|
||||||
Release: 2.dev.git%{shortcommit0}%{?dist}
|
Release: 3.dev.git%{shortcommit0}%{?dist}
|
||||||
Summary: Manage Pods, Containers and Container Images
|
Summary: Manage Pods, Containers and Container Images
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: %{git_podman}
|
URL: %{git_podman}
|
||||||
Source0: %{git0}/archive/%{commit0}/%{repo}-%{shortcommit0}.tar.gz
|
Source0: %{git0}/archive/%{commit0}/%{repo}-%{shortcommit0}.tar.gz
|
||||||
|
Patch: rootless.patch
|
||||||
# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
|
# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
|
||||||
#ExclusiveArch: %%{?go_arches:%%{go_arches}}%%{!?go_arches:%%{ix86} x86_64 aarch64 %%{arm}}
|
#ExclusiveArch: %%{?go_arches:%%{go_arches}}%%{!?go_arches:%%{ix86} x86_64 aarch64 %%{arm}}
|
||||||
ExclusiveArch: aarch64 %{arm} ppc64le s390x x86_64
|
ExclusiveArch: aarch64 %{arm} ppc64le s390x x86_64
|
||||||
@ -206,6 +207,24 @@ Summary: Python 3 tool for %{name}
|
|||||||
This package contains Python 3 tool for %{name}.
|
This package contains Python 3 tool for %{name}.
|
||||||
%endif # varlink
|
%endif # varlink
|
||||||
|
|
||||||
|
%package docker
|
||||||
|
Summary: "package to Emulate Docker CLI using podman."
|
||||||
|
BuildArch: noarch
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
Conflicts: docker
|
||||||
|
Conflicts: docker-latest
|
||||||
|
Conflicts: docker-ce
|
||||||
|
Conflicts: docker-ee
|
||||||
|
|
||||||
|
%description docker
|
||||||
|
This package installs a script named docker that emulates the Docker CLI by
|
||||||
|
executes podman commands, it also creates links between all Docker CLI man
|
||||||
|
pages and podman.
|
||||||
|
|
||||||
|
%files docker
|
||||||
|
%{_bindir}/docker
|
||||||
|
%{_mandir}/man1/docker*.1*
|
||||||
|
|
||||||
%if 0%{?with_devel}
|
%if 0%{?with_devel}
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Library for applications looking to use Container Pods
|
Summary: Library for applications looking to use Container Pods
|
||||||
@ -404,18 +423,11 @@ install -dp %{buildroot}%{_unitdir}
|
|||||||
install.man \
|
install.man \
|
||||||
install.cni \
|
install.cni \
|
||||||
install.systemd \
|
install.systemd \
|
||||||
install.completions
|
install.completions \
|
||||||
|
install.docker
|
||||||
|
|
||||||
%if %{with varlink}
|
%if %{with varlink}
|
||||||
#install python-podman
|
%{__make} DESTDIR=%{buildroot} install.python
|
||||||
pushd contrib/python/podman
|
|
||||||
%py3_install
|
|
||||||
popd
|
|
||||||
|
|
||||||
#install python-pypodman
|
|
||||||
pushd contrib/python/pypodman
|
|
||||||
%py3_install
|
|
||||||
popd
|
|
||||||
%endif # varlink
|
%endif # varlink
|
||||||
|
|
||||||
# install libpod.conf
|
# install libpod.conf
|
||||||
@ -493,7 +505,7 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
|
|||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.md CONTRIBUTING.md pkg/hooks/README-hooks.md install.md code-of-conduct.md transfer.md
|
%doc README.md CONTRIBUTING.md pkg/hooks/README-hooks.md install.md code-of-conduct.md transfer.md
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%{_mandir}/man1/*.1*
|
%{_mandir}/man1/podman*.1*
|
||||||
%{_mandir}/man5/*.5*
|
%{_mandir}/man5/*.5*
|
||||||
%{_datadir}/bash-completion/completions/*
|
%{_datadir}/bash-completion/completions/*
|
||||||
%config(noreplace) %{_sysconfdir}/cni/net.d/87-%{name}-bridge.conflist
|
%config(noreplace) %{_sysconfdir}/cni/net.d/87-%{name}-bridge.conflist
|
||||||
@ -533,6 +545,10 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Aug 12 2018 Dan Walsh <dwalsh@redhat.com> - 1:0.8.3-3.dev.git3d55721f
|
||||||
|
- Add podman-docker support
|
||||||
|
- Force cgroupfs for non root podman
|
||||||
|
|
||||||
* Sun Aug 12 2018 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1:0.8.3-2.dev.git3d55721f
|
* Sun Aug 12 2018 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1:0.8.3-2.dev.git3d55721f
|
||||||
- Requires: conmon
|
- Requires: conmon
|
||||||
- use default %gobuild
|
- use default %gobuild
|
||||||
|
15
rootless.patch
Normal file
15
rootless.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
diff --git a/cmd/podman/libpodruntime/runtime.go b/cmd/podman/libpodruntime/runtime.go
|
||||||
|
index 9d1347cc..f1f2b963 100644
|
||||||
|
--- a/cmd/podman/libpodruntime/runtime.go
|
||||||
|
+++ b/cmd/podman/libpodruntime/runtime.go
|
||||||
|
@@ -105,6 +105,10 @@ func GetRuntimeWithStorageOpts(c *cli.Context, storageOpts *storage.StoreOptions
|
||||||
|
|
||||||
|
if c.GlobalIsSet("cgroup-manager") {
|
||||||
|
options = append(options, libpod.WithCgroupManager(c.GlobalString("cgroup-manager")))
|
||||||
|
+ } else {
|
||||||
|
+ if rootless.IsRootless() {
|
||||||
|
+ options = append(options, libpod.WithCgroupManager("cgroupfs"))
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO flag to set libpod static dir?
|
Loading…
Reference in New Issue
Block a user