Skip to content

Commit

Permalink
ADDED configurable BIN folder
Browse files Browse the repository at this point in the history
FIXED systemd unit file to take in user provided path

Signed-off-by: zelahi <[email protected]>
  • Loading branch information
zelahi committed May 23, 2019
1 parent ac63bbb commit c5cd433
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions rootless-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ SCRIPT_COMMIT_SHA=UNKNOWN
set -e

init_vars() {
BIN="$HOME/bin"
BIN="${DOCKER_BIN:-$HOME/bin}"

DAEMON=dockerd
SYSTEMD=
if systemctl --user daemon-reload >/dev/null 2>&1; then
Expand Down Expand Up @@ -185,9 +186,9 @@ start_docker() {
fi

mkdir -p $HOME/.config/systemd/user

DOCKERD_FLAGS="--experimental"

if [ -n "$SKIP_IPTABLES" ]; then
DOCKERD_FLAGS="$DOCKERD_FLAGS --iptables=false"
fi
Expand All @@ -211,8 +212,8 @@ Description=Docker Application Container Engine (Rootless)
Documentation=https://docs.docker.com
[Service]
Environment=PATH=$HOME/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ExecStart=$HOME/bin/dockerd-rootless.sh $DOCKERD_FLAGS
Environment=PATH=$BIN:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ExecStart=$BIN/dockerd-rootless.sh $DOCKERD_FLAGS
ExecReload=/bin/kill -s HUP \$MAINPID
TimeoutSec=0
RestartSec=2
Expand Down

0 comments on commit c5cd433

Please sign in to comment.