Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

docker

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?

like image 587
Zuriar Avatar asked Jul 30 '16 16:07

Zuriar


People also ask

Can I use Docker CLI without license?

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.

What is difference between Docker and Docker daemon?

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.

Why does Docker need a daemon?

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.

What is the Docker CLI?

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.


1 Answers

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

like image 116
Aaron V Avatar answered Sep 20 '22 03:09

Aaron V