12

I've noticed that Ubuntu 20.04 (Focal Fossa) comes with the latest docker engine ready to be installed.

On may/2020 if you do:

# apt update
# apt install -y docker.io

you get docker version 19.03.8 which, in turn, is the latest published (to the date) by the docker friends.

This is amazing! This installs both the latest engine and client from the ubuntu's standard package repos. Great!

But now... I want to have a client machine with only the docker client. I don't want the engine itself downloaded in this machine. Only the client part.

In the past

According to this https://docs.docker.com/engine/install/ubuntu/ until ubuntu 19.10 it seemed to exist docker-ce-cli.

But in a Focal Fossa 20.04 this happens:

# apt-get update
[omitted]
# apt-get install docker-ce-cli
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package docker-ce-cli

Question

What package should I install in ubuntu 20.04 to have only the docker cli?

# apt install -y xxxxxxxxx?
Xavi Montero
  • 365
  • 4
  • 10
  • 3
    I believe the `docker-ce-cli` package is in a custom `apt` repository provided by docker.com, rather than a default repository. See: https://docs.docker.com/engine/install/ubuntu/ – Daniel Stevens Jan 29 '21 at 13:27

2 Answers2

3

As specified in the official source :

sudo apt-get update && \
     sudo apt-get install \
        ca-certificates \
        curl \
        gnupg \
        lsb-release
    
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
    
echo \
      "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
      $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

To add repositories and package lists.

Then you can run :

sudo apt install docker-ce-cli
Stabledog
  • 971
  • 8
  • 12
The Cool Man
  • 157
  • 1
  • 2
  • 16
0

Try this command

sudo apt-get install docker-ce-cli This might do what you need