Add lxc-docker.install

Adding this install script, which adds a `docker' group, allows users to
be added to the `docker' group, which in turn allows them to run the
docker client without being root.
This commit is contained in:
Tom Willemse 2013-10-05 11:18:56 +02:00
parent e135618832
commit 7f03eea41e
2 changed files with 20 additions and 1 deletions

View file

@ -9,7 +9,7 @@
# Maintainer: frio <development@frio.name> # Maintainer: frio <development@frio.name>
pkgname=lxc-docker pkgname=lxc-docker
pkgver=0.6.3 pkgver=0.6.3
pkgrel=1 pkgrel=2
pkgdesc="Docker - the Linux container runtime" pkgdesc="Docker - the Linux container runtime"
arch=('x86_64') arch=('x86_64')
url="https://github.com/dotcloud/docker" url="https://github.com/dotcloud/docker"
@ -26,6 +26,7 @@ sha1sums=(
'f6c700a8fe20d1399409046ca74bd52c37678c0c' 'f6c700a8fe20d1399409046ca74bd52c37678c0c'
'b040b6fa5465a4ded3239c58bdcc0195a0d196f0' 'b040b6fa5465a4ded3239c58bdcc0195a0d196f0'
) )
install=lxc-docker.install
package() { package() {
# install systemd service unit # install systemd service unit

View file

@ -0,0 +1,18 @@
post_install()
{
if ! getent group docker >/dev/null; then
groupadd --system docker
fi
}
post_upgrade()
{
post_install $1
}
post_remove()
{
if getent group docker >/dev/null; then
groupdel docker
fi
}