blob: 2092fca4bf8b21cd6be850aa1121dd7c61a5e7e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# Maintainer: Ľubomír 'the-k' Kučera <lubomir.kucera.jr at gmail.com>
# Contributor: Hugo Osvaldo Barrera <hugo@barrera.io>
# Contributor: PastLeo <chgu82837@gmail.com>
# Contributor: koba1t <kobdotsh at gmail dot com>
pkgname=docker-rootless-extras
pkgver=27.4.1
pkgrel=1
pkgdesc="Extras to run docker as non-root."
arch=('x86_64' 'aarch64')
url="https://docs.docker.com/engine/security/rootless/"
license=('Apache')
depends=('docker' 'rootlesskit' 'slirp4netns')
optdepends=('fuse-overlayfs: overlayfs support')
provides=('docker-rootless' 'docker-rootless-extras' 'docker-rootless-extras-bin')
conflicts=('docker-rootless' 'docker-rootless-extras' 'docker-rootless-extras-bin')
install=$pkgname.install
source=(
"dockerd-rootless-${pkgver}.sh::https://raw.githubusercontent.com/moby/moby/v${pkgver}/contrib/dockerd-rootless.sh"
"dockerd-rootless-setuptool-${pkgver}.sh::https://raw.githubusercontent.com/moby/moby/v${pkgver}/contrib/dockerd-rootless-setuptool.sh"
"docker.socket"
"99-docker-rootless.conf")
sha256sums=('5a4fcf228be8e5d2fd6c0676c858372a2afb95144675d02f215301272c344f65'
'd6ddae456cc5ecdd5285035d24ad3546898872e5c4d407718ced0d4fa19031ff'
'd8695293e5d4a814763f13e1d36ed37273040666b4b91363d6c33171df8934c7'
'd0d790d4c3d887b10b2b155b83a58a44980b9fa638f8c0f1faec0739dc0ef473')
package() {
install -Dm755 "$srcdir/dockerd-rootless-${pkgver}.sh" "$pkgdir/usr/bin/dockerd-rootless.sh"
install -Dm644 "$srcdir/docker.socket" "$pkgdir/usr/lib/systemd/user/docker.socket"
install -Dm644 "$srcdir/99-docker-rootless.conf" "$pkgdir/usr/lib/sysctl.d/99-docker-rootless.conf"
# The systemd service file is bundled inside the setup script. The script is
# unsuitable to run in this PKGBUILD, since it tampers with $HOME and other
# similar paths, so would mess up the environment for users who run
# `makepkg` on their host.
# TODO: Send a patch upstream so we can make the script JUST print this.
awk '/Unit/,/EOT/' "$srcdir/dockerd-rootless-setuptool-$pkgver.sh" | \
head -n-1 | \
sed 's/^[[:space:]]*//' | \
sed 's|$BIN|/usr/bin|' | \
sed 's|\\$MAINPID|$MAINPID|' | \
sed 's| $DOCKERD_ROOTLESS_SH_FLAGS||' \
> "$pkgdir/usr/lib/systemd/user/docker.service"
# Remove the $PATH override, since this will be dependant on $PATH at build
# time and is usually undesirable.
# TODO: Patch this upstream.
sed -i '/Environment=PATH=/d' "$pkgdir/usr/lib/systemd/user/docker.service"
}
|