-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a way to download only the docker-cli #2281
Comments
This comment has been minimized.
This comment has been minimized.
thanks to @StefanScherer and his work on https://github.com/StefanScherer/docker-cli-builder/ there is a way to get the file, but in my opinion there should be an official way to get this. |
For linux, the CLI and Engine (daemon) are separate packages nowadays, so you can install just the If you want to use add the cli to an image you're building, there's an easy way to do this in your Dockerfile: FROM <your base image>
COPY --from=docker:20.10 /usr/local/bin/docker /usr/local/bin/ The above will pull the official If you want to be able to specify the version to install at build time, you can use a build-arg. For example: ARG DOCKER_VERSION=20.10
# create an "alias" because COPY --from does not support expanding variables
FROM docker:${DOCKER_VERSION} AS docker
FROM ubuntu:20.04
COPY --from=docker /usr/local/bin/docker /usr/local/bin/ Then to override the default version, (e.g. to install the docker 20.10.12 cli); docker build -t foo --build-arg DOCKER_VERSION=20.10.12 . |
edit: ignore this, there's no images for windows 😅 |
Thanks for your answer @thaJeztah! That covers the docker use case. But if I am working on a normal VM or PC I can't just copy if from the docker image. So there still is no easy way to just download the CLI. As a side note, there seems to be an easy way to get the CLI (in Linux and Mac, but not for Windows) |
Yes, the Windows binaries were no longer published at some point, because for Windows only Docker for Windows ("Docker Desktop"), for desktop machines, and Docker Enterprise (for Windows Server) were supported. Changing that (and at least publish client binaries again) is being discussed, but no decision was made yet. You can find "master" builds on https://master.dockerproject.org (but that location is being deprecated, which is where the discussion about this comes in 😅) |
Well, then you can use this issue for tracking progress on it :) |
@DanielHabenicht @thaJeztah Thanks for taking in interest this issue. I should add that there is a following trends using VSCode, and the recent remote developper tools which solves really some big problems on Windows (like abilities to work directly in containers on Windows without having to use the so slow Docker for Windows sharing folder ; )). The only downside is vscode remote containers need a docker client installed... So I am here : ) For now we extract it from the full Docker binaries, but this is painfull for a developper team. I hope my experience return make sense, and i think having separated cli is more and more needed for the days to come. Thanks. |
@thaJeztah are there any news about that decision, and more importantly, will you also release a docker-compose? |
Last I heard is that discussions around Windows packages are still ongoing (think some legal and/or partner things to tackle). As to packages for docker-compose; no change of plan there (afaik); docker-compose is shipped as part of Docker Desktop, and builds for releases can be found on GitHub; https://github.com/docker/compose/releases |
Our team builds docker images during build process on build server. Build server is running Windows Server OS, and the Docker host is running Ubuntu. Both are virtual machines, To use Docker CLI from build server, we have to apply workarounds posted at Stackoverflow page mentioned above. Why just don't provide an installer option "Install Docker CLI only" for Docker Desktop? |
I used the chocolatey package docker-cli in a windows docker container to access the docker daemon on the host (DIND). It seems to work well. |
Would really really really appreciate a windows CLI install (by whatever method) of Docker, as we are unable to run the daemon on windows due to security constraints. |
Was looking for a Windows CLI only install today as well and was surprised to find there is none. Would be great to have this...just need to run some commands from a windows box. |
+1 |
I was hoping something like this was available. I'm running my application on AWS lambda with docker and I just need the CLI for windows so the VS tools for AWS can package my app. Is there a work-around to publish without installing the daemon. |
I would also love if the Docker CLI binary was simply provided by this repo (e.g. under Packages). |
what is this? |
With the latest license change this issue gets more relevant for people who won't be able to use Docker Desktop. |
@DanielHabenicht what exactly do you want to download?
|
Great so the issue is almost resolved! I would pledge for making the information you just posted more readily available. How about Linking them on the Docker Page and also adding the link to each version to the Github Release of this Repository? |
We added this chapter to our docs recently: https://docs.docker.com/engine/install/binaries/#install-server-and-client-binaries-on-windows |
For Windows, this will get docker and docker-compose installed, but only for Windows containers. Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
choco install docker-engine docker-cli docker-compose -force
dockerd --register-service
Start-Service docker How would one go about setting it to linux engine mode (I'm guessing a linux VM would be needed too). |
I use wsl2 and and install docker for linux there |
Fair, but for those of us working on managed computers that have WSL blocked, is there a dockerd switch to tell it to handle Linux containers? Our do we need to run a Linux VM and point Windows' docker to it somehow? |
No, there isn't. Well, on docker 20.10 and older, to some extend there is, through LCOW ("Linux Containers On Windows"), but it's an experimental feature that was only partially implemented by Microsoft as a PoC, but it's being removed as it was no longer maintained, and has many known issues/limitations (see #3223, #2798, and issues linked from that). Providing Linux support is (among others) what Docker Desktop provides, which can use either WSL2 or Hyper-V. To set this up without Docker Desktop would either require setting up a Docker Engine in WSL2 or a VM (wiring up networking, host-file sharing, and many other bits, if you want it to be usable from your Windows environment), or running a remote Docker Engine (e.g. in a cloud provider), and connecting the CLI to that instance, but this would not facilitate sharing your Windows filesystem out of the box. |
I wish to download only from docker hub images to .tar without install the entire docker engine, is that possible? |
@lixaotec do you want the cli binary inside a docker image, or on your host? If you need it inside a docker image, look at #2281 (comment) |
Dear @thaJeztah , tks for replying. |
@thaJeztah
Just do this |
Yes, the CLI itself does not pull images; if you only need the image itself, you can pull the image data with (e.g.) some bash script; https://github.com/moby/moby/blob/v20.10.13/contrib/download-frozen-image-v2.sh (which saves the image configuration and layers), or (I think it supports this as well), a tool like https://github.com/regclient/regclient |
Totally agree. My IDE on Windows and docker daemon on a Linux VM. Maybe docker-cli can be like kubectl? |
Install docker cli /docker client-
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) To check version choco --v
choco install docker-cli |
@ayush12993: That package is deprecated. |
You can use this docker official link to download the docker client. It provides both docker daemon/server and cli binaries for Windows, MacOS and Linux. I have tried using the windows client downloaded from here (part of the official link above) with a remote Docker installation (within |
As latest it worked for me.... Turn Windows Features ON/OFF Enable Both Virtual Machine Platform Windows Hyperviser Platform Restart it Download from here -- Run below commands on powershell as admin
|
having the same requirement to only install docker cli in a container and using socat to using another docker backend |
There is no way to verify files downloaded from |
I do not want to install Docker Desktop since it is closed source proprietary software I do want to install Docker CLI on Linux, however it is hard to do with the instructions on the website and the docker.io package in the Debian/Ubuntu package repository are outdated. It would be nice to have a simple DEB file that you can download to install Docker CLI on most or all Debian and Ubuntu based distributions and to have these DEB file also setup a 3rd party repository when you install Docker CLI to receive updates for Docker CLI |
Such packages already exist; for example, here's the packages for Ubuntu 22.04 ("jammy") for x86; https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/ That package repository has separate packages for apt-cache madison docker-ce-cli | head -n2
docker-ce-cli | 5:26.0.2-1~ubuntu.22.04~jammy | https://download.docker.com/linux/ubuntu jammy/stable arm64 Packages
docker-ce-cli | 5:26.0.1-1~ubuntu.22.04~jammy | https://download.docker.com/linux/ubuntu jammy/stable arm64 Packages
apt-cache madison docker-buildx-plugin | head -n2
docker-buildx-plugin | 0.14.0-1~ubuntu.22.04~jammy | https://download.docker.com/linux/ubuntu jammy/stable arm64 Packages
docker-buildx-plugin | 0.13.1-1~ubuntu.22.04~jammy | https://download.docker.com/linux/ubuntu jammy/stable arm64 Packages
apt-cache madison docker-compose-plugin | head -n2
docker-compose-plugin | 2.26.1-1~ubuntu.22.04~jammy | https://download.docker.com/linux/ubuntu jammy/stable arm64 Packages
docker-compose-plugin | 2.25.0-1~ubuntu.22.04~jammy | https://download.docker.com/linux/ubuntu jammy/stable arm64 Packages But of course you can download individual |
Can't you just publish these as Github releases? That way it works with a larger ecosystem of tools. How do I use the Docker CLI with |
I don't think we can do that with our current release pipeline. Btw, you can also obtain a cli binary from the For example, you can download the latest
You can also download a bleeding-edge build off
The image contains only a single |
I feel like there are a number of ways to do this, you could for example:
The binaries available from download.docker.com are perfect content-wise, but they don't follow a normal GitHub releases gives you an API for distributing these binaries that existing ecosystem tools integrate with. For example, with |
Description
Steps to reproduce the issue:
Describe the results you received:
It is not possible to simply download and execute the docker-cli somewhere.
Describe the results you expected:
A simple download link to each version of the docker-cli released, or bundled with the main docker release (https://www.docker.com/products/docker-desktop).
Additional information you deem important (e.g. issue happens only occasionally):
This Stackoverflow describes various workarounds, in short:
The text was updated successfully, but these errors were encountered: