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?
No, you do not. You can continue to access and use the content from Docker Hub under the Personal Subscription for commercial use. If you are doing this from Docker Desktop for commercial use, you will need to have a subscription for the use of Docker Desktop.
Docker Engine is the core product of Docker, including its daemon (dockerd) as well as its CLI (docker). Docker Daemon is simply a part of Docker Engine. Quoting the Docker engine overview page: Docker Engine is an open source containerization technology for building and containerizing your applications.
Docker daemon is installed on a host machine and essentially acts as the brain of the Docker; it creates and manages your Docker images on your behalf. Its whole purpose is to perform the commands that the client issues.
The Docker client provides a command line interface (CLI) that allows you to issue build, run, and stop application commands to a Docker daemon. The main purpose of the Docker Client is to provide a means to direct the pull of images from a registry and to have it run on a Docker host.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With