pkgs/run-with-docker-group: Add script
This commit is contained in:
14
pkgs/run-with-docker-group/run-with-docker-group.sh
Executable file
14
pkgs/run-with-docker-group/run-with-docker-group.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [[ $# -eq 0 ]]; then
|
||||
set -- "${SHELL}"
|
||||
fi
|
||||
|
||||
exec systemd-run \
|
||||
"--property=User=$(id -un)" \
|
||||
"--property=SupplementaryGroups=docker" \
|
||||
"--pty" "--same-dir" "--wait" "--collect" "--service-type=exec" \
|
||||
"--quiet" \
|
||||
"$@"
|
Reference in New Issue
Block a user