How to Install?
This process will help you to guide you to install docker on a Ubuntu machine.
Install Docker from Ubuntu Repository
You can use apt-get command to install the Docker from Ubuntu base repository.
Start the docker service and enable it to start automatically on system startup.
Now, verify the docker version.
Install Docker from Official Docker Repository
Prerequisites
Uninstall the older versions of Docker package, named docker or docker-engine or docker.io along with associated dependencies.
If the system does not have Docker packages, skip the below step.
Contents such as images, volumes, and networks under /var/lib/docker/ are preserved.
Setup
Setup docker, open terminal and execute:
Install the below packages to ensure the apt
work with https method, and CA certificates are installed.
Add the GPG key for Docker repository on your system.
Now, add the official Docker repository by running the below command in the terminal.
Update the apt database.
Make sure you are installing the docker package from the official repository.
Output:
More info: https://docs.docker.com/v17.09/engine/installation/linux/docker-ce/ubuntu/#install-docker-ce-1
Mac OS
Open a terminal an execute the following command:
Then launch the Docker app. Click next. It will ask for privileged access. Confirm. A whale icon should appear in the top bar. Click it and wait for "Docker is running" to appear.
You should be able to rundocker
commands now.
Last updated