Merge pull request #43521 from thaJeztah/rootless_fixups
minor rootless fix-ups
This commit is contained in:
commit
104ac2ca49
2 changed files with 3 additions and 20 deletions
|
@ -52,11 +52,6 @@ func installConfigFlags(conf *config.Config, flags *pflag.FlagSet) error {
|
|||
if err != nil {
|
||||
return errors.Wrapf(err, "running with RootlessKit, but %s not installed", rootless.RootlessKitDockerProxyBinary)
|
||||
}
|
||||
|
||||
configHome, err := homedir.GetConfigHome()
|
||||
if err == nil {
|
||||
registry.SetCertsDir(filepath.Join(configHome, "docker/certs.d"))
|
||||
}
|
||||
}
|
||||
flags.StringVar(&conf.BridgeConfig.UserlandProxyPath, "userland-proxy-path", defaultUserlandProxyPath, "Path to the userland proxy binary")
|
||||
flags.StringVar(&conf.CgroupParent, "cgroup-parent", "", "Set parent cgroup for all containers")
|
||||
|
|
|
@ -3,29 +3,17 @@ package rootless // import "github.com/docker/docker/rootless"
|
|||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sync"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rootless-containers/rootlesskit/pkg/api/client"
|
||||
)
|
||||
|
||||
const (
|
||||
// RootlessKitDockerProxyBinary is the binary name of rootlesskit-docker-proxy
|
||||
RootlessKitDockerProxyBinary = "rootlesskit-docker-proxy"
|
||||
)
|
||||
|
||||
var (
|
||||
runningWithRootlessKit bool
|
||||
runningWithRootlessKitOnce sync.Once
|
||||
)
|
||||
// RootlessKitDockerProxyBinary is the binary name of rootlesskit-docker-proxy
|
||||
const RootlessKitDockerProxyBinary = "rootlesskit-docker-proxy"
|
||||
|
||||
// RunningWithRootlessKit returns true if running under RootlessKit namespaces.
|
||||
func RunningWithRootlessKit() bool {
|
||||
runningWithRootlessKitOnce.Do(func() {
|
||||
u := os.Getenv("ROOTLESSKIT_STATE_DIR")
|
||||
runningWithRootlessKit = u != ""
|
||||
})
|
||||
return runningWithRootlessKit
|
||||
return os.Getenv("ROOTLESSKIT_STATE_DIR") != ""
|
||||
}
|
||||
|
||||
// GetRootlessKitClient returns RootlessKit client
|
||||
|
|
Loading…
Reference in a new issue