firelyu
firelyu

Reputation: 2232

How to check the docker is installed by apt-get in ubuntu?

I can install the docker with curl -sSL https://get.docker.com/ | sh in Ubuntu. I read the script, and find if the previous docker is not installed by apt-get install docker-engine, there should be trouble.

To improve the script, I want to terminate it if the docker is not installed by apt-get.

How can I know whether the docker in installed by apt-get?

Warning: the "docker" command appears to already exist on this system.

  If you already have Docker installed, this script can cause trouble, which is
  why we're displaying this warning and provide the opportunity to cancel the
  installation.

  If you installed the current Docker package using this script and are using it
  again to update Docker, you can safely ignore this message.

  You may press Ctrl+C now to abort this script.

Upvotes: 2

Views: 12602

Answers (1)

Eldad Assis
Eldad Assis

Reputation: 11055

apt-get is mostly for installing and updating.
List you installed docker packages with sudo dpkg -l | grep docker

I hope this is what you meant.

Upvotes: 8

Related Questions