CyberKeeda In Social Media

How to install and configure Docker-CE on Ubuntu


  • Begin with updating your system packages and remove other versions of docker and it's dependencies.
$  sudo apt-get remove docker docker-engine containerd runc
$  sudo apt-get update
  • Prepare system to download and install docker-ce from official repositories over https.
$  sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
$  curl -fsSL | sudo apt-key add -
$  sudo apt-key fingerprint 0EBFCD88

$  sudo add-apt-repository \
   "deb [arch=amd64] \
   $(lsb_release -cs) \

  • Once docker repository is enabled, proceed ahead to install Docker-CE ( Community Edition.
$  sudo apt-get update
$  sudo apt-get install docker-ce docker-ce-cli

Now docker-ce has been installed, lets start the docker daemon and enable it on boot.
$  sudo systemctl start docker
$  sudo systemctl enable docker
  • To verify the status of  docker, run the below command.
$  sudo systemctl status docker

    • In case, if you want to check your installed docker version.
    $  sudo docker -v

    Run Docker commands without sudo

    By default managing Docker requires administrator privileges. If you want to run Docker commands as a non-root user without adding sudo within yoir command you need to add your user to the docker group which is created during the installation of the Docker CE package. Add your user to docker group by below command.

    $  sudo usermod -aG docker $USER

    Logout- Login to reflect the changes.

    1 comment:

    Designed By Jackuna