Is it possible to install only the docker cli and not the daemon

后端 未结 6 596
青春惊慌失措
青春惊慌失措 2020-12-08 03:52

I want to have docker CLI to connect to remote daemon but do I need to install the whole engine including daemon on the local machine?

6条回答
  •  旧时难觅i
    2020-12-08 04:29

    If you are on Windows, you can download an up-to-date build of Docker CLI from here:

    StefanScherer/docker-cli-builder

    And point to a remote Docker Daemon by setting DOCKER_HOST environment variable:

    $env:DOCKER_HOST = 'tcp://X.X.X.X:2375'
    

    Please note that, in order for this to work, the Docker Daemon must be configured to expose its API over TCP. This can be done in daemon.json file:

    {
        "hosts": ["unix:///var/run/docker.sock", "tcp://0.0.0.0:2375"]
    }
    

提交回复
热议问题