diff --git a/docker/control/Dockerfile b/docker/control/Dockerfile index 71210fc2eb..a8fb624901 100644 --- a/docker/control/Dockerfile +++ b/docker/control/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.16 +FROM golang:1.16-bullseye # Use mirrors for poor network... diff --git a/docker/node/Dockerfile b/docker/node/Dockerfile index 823772972c..b3cf54eb94 100644 --- a/docker/node/Dockerfile +++ b/docker/node/Dockerfile @@ -1,5 +1,5 @@ # Based on the deprecated `https://github.com/tutumcloud/tutum-debian` -FROM golang:1.16 +FROM golang:1.16-bullseye # Use mirrors for poor network... #RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list && \ @@ -15,6 +15,7 @@ RUN apt-get update && \ openssh-server \ openjdk-11-jre-headless \ sudo vim \ + iproute2 \ && \ mkdir -p /var/run/sshd && \ sed -i "s/UsePrivilegeSeparation.*/UsePrivilegeSeparation no/g" /etc/ssh/sshd_config && \ diff --git a/pkg/cluster/executor/local.go b/pkg/cluster/executor/local.go index f3e808a4f8..a3916267ec 100644 --- a/pkg/cluster/executor/local.go +++ b/pkg/cluster/executor/local.go @@ -49,7 +49,7 @@ func (l *Local) Execute(ctx context.Context, cmd string, sudo bool, timeout ...t } // set a basic PATH in case it's empty on login - cmd = fmt.Sprintf("PATH=$PATH:/usr/bin:/usr/sbin %s", cmd) + cmd = fmt.Sprintf("PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin %s", cmd) if l.Locale != "" { cmd = fmt.Sprintf("export LANG=%s; %s", l.Locale, cmd) diff --git a/pkg/cluster/executor/ssh.go b/pkg/cluster/executor/ssh.go index 7e0d520932..94aeb3af7b 100644 --- a/pkg/cluster/executor/ssh.go +++ b/pkg/cluster/executor/ssh.go @@ -143,7 +143,7 @@ func (e *EasySSHExecutor) Execute(ctx context.Context, cmd string, sudo bool, ti } // set a basic PATH in case it's empty on login - cmd = fmt.Sprintf("PATH=$PATH:/usr/bin:/usr/sbin %s", cmd) + cmd = fmt.Sprintf("PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin %s", cmd) if e.Locale != "" { cmd = fmt.Sprintf("export LANG=%s; %s", e.Locale, cmd) @@ -280,7 +280,7 @@ func (e *NativeSSHExecutor) Execute(ctx context.Context, cmd string, sudo bool, } // set a basic PATH in case it's empty on login - cmd = fmt.Sprintf("PATH=$PATH:/usr/bin:/usr/sbin %s", cmd) + cmd = fmt.Sprintf("PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin %s", cmd) if e.Locale != "" { cmd = fmt.Sprintf("export LANG=%s; %s", e.Locale, cmd)