Package Details: docker-rootless 19.03.5-1

Git Clone URL: https://aur.archlinux.org/docker-rootless.git (read-only, click to copy)
Package Base: docker-rootless
Description: Run the Docker daemon as a non-root user (Rootless mode)
Upstream URL: https://docs.docker.com/engine/security/rootless/
Licenses: Apache
Provides: docker-rootless
Submitter: pastleo
Maintainer: pastleo
Last Packager: pastleo
Votes: 0
Popularity: 0.000000
First Submitted: 2019-12-02 14:07
Last Updated: 2020-01-12 05:12

Pinned Comments

pastleo commented on 2020-01-12 05:24

For people who wants to use docker without adding user to docker group or sudo, which can be useful for development environment, this package might be for you

However there are some steps need to be done to get rootless docker to work after installing this package:

1. configure kernel settings

create /etc/sysctl.d/99-docker-rootless.conf:

kernel.unprivileged_userns_clone=1

and then run: sudo sysctl --system

see https://docs.docker.com/engine/security/rootless/#distribution-specific-hint for detailed information

2. configure subuid and subgid

create /etc/subuid and /etc/subgid with: (for example, testuser is username)

testuser:231072:65536

see https://docs.docker.com/engine/security/userns-remap/#prerequisites for detailed information

3. start and enable user service: systemctl --user status|start|stop docker
4. finally set docker socket environment variable:
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock

you can also add it to ~/.bashrc or somewhere alike


Please read https://docs.docker.com/engine/security/rootless/ for more information

Latest Comments

pastleo commented on 2020-01-12 05:24

For people who wants to use docker without adding user to docker group or sudo, which can be useful for development environment, this package might be for you

However there are some steps need to be done to get rootless docker to work after installing this package:

1. configure kernel settings

create /etc/sysctl.d/99-docker-rootless.conf:

kernel.unprivileged_userns_clone=1

and then run: sudo sysctl --system

see https://docs.docker.com/engine/security/rootless/#distribution-specific-hint for detailed information

2. configure subuid and subgid

create /etc/subuid and /etc/subgid with: (for example, testuser is username)

testuser:231072:65536

see https://docs.docker.com/engine/security/userns-remap/#prerequisites for detailed information

3. start and enable user service: systemctl --user status|start|stop docker
4. finally set docker socket environment variable:
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock

you can also add it to ~/.bashrc or somewhere alike


Please read https://docs.docker.com/engine/security/rootless/ for more information

pastleo commented on 2020-01-12 05:14

thank you ef004 for finding this link: https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-$pkgver.tgz

I have updated this package and if there's any problem please let me know!

ef004 commented on 2020-01-11 23:24

The modified the PKGBUILD slightly to make it work

# Maintainer: PastLeo <chgu82837@gmail.com>
pkgname=docker-rootless
pkgver=19.03.5
pkgrel=1
pkgdesc="Run the Docker daemon as a non-root user (Rootless mode)"
arch=('x86_64')
url="https://docs.docker.com/engine/security/rootless/"
license=('Apache')
depends=('docker')
provides=('docker-rootless')
install=docker-rootless.install
source=(
    "https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-$pkgver.tgz"
    "docker.service"
)

md5sums=(
    "7251a34d0fc2d6faf6e0952566779fb5"
    "c5158588c36fc80cf85835258f8cd345"
)

sha256sums=(
    "85fb4012f8c95864b3c0da2308b99ed91c0b65f605ea6d8d2f7eb6f23812f47d"
    "eefe4eaa55184c396f929a2436a22af97130c6e7f8791a79582902dea7c4cd9b"
)

package() {
    mkdir -p "$pkgdir/usr/bin/"
    install -Dm755 "$srcdir/docker-rootless-extras/"* "$pkgdir/usr/bin/"
    install -Dm644 "$srcdir/docker.service" "$pkgdir/usr/lib/systemd/user/docker.service"
}

kmfrick commented on 2019-12-24 09:29

Please update the md5sum of the tgz file.

17ff08d600dcae2da96e52afba95d0cf docker-rootless-extras.tgz