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

后端 未结 6 598
青春惊慌失措
青春惊慌失措 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条回答
  •  没有蜡笔的小新
    2020-12-08 04:10

    First, download and unzip/untar the release for your system. Here are x86_64 binaries for mac, linux, windows.

    After expanding the archive, you can find the docker CLI executable at ./docker/docker - move that file into your path, and you're done.

    If you're specifically looking to install the docker CLI into a docker image, here's my Dockerfile command to do so:

    ENV DOCKERVERSION=18.03.1-ce
    RUN curl -fsSLO https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKERVERSION}.tgz \
      && tar xzvf docker-${DOCKERVERSION}.tgz --strip 1 \
                     -C /usr/local/bin docker/docker \
      && rm docker-${DOCKERVERSION}.tgz
    

    h/t to this comment

提交回复
热议问题