This is a step-by-step tutorial that details on how to configure Docker and pull down images that can be deployed as containers.
ssh root@your_ip_address and press enter.
You can look up your IPv4 address in the Digital Ocean control panel.
Enter the password provided to you on your email by Digital Ocean. Then, enter the new password for the root user. We’re inside our Ubuntu server now.
Let’s now install Docker which is available in the Ubuntu repositories.
Start by removing any previous Docker that could be installed on the system.
sudo apt-get remove docker docker-engine docker.io containerd runc
Now add the Docker’s official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Verify that you have the key with the fingerprint by:
sudo apt-key fingerprint 0EBFCD88
which should produce the folowling output:
pub rsa4096 2017-02-22 [SCEA] 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 uid [ unknown] Docker Release (CE deb) <email@example.com> sub rsa4096 2017-02-22 [S]
Add the stable docker repository:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Update the package index Sudo apt update
Install Docker CE
Sudo apt install docker-ce
Check that the docker is running successfully by running: docker run hello-world COnfigure the docker process to start and run on boot: systemctl start docker systemctl enable docker Pulling images WE now pull the images from the Docker hub which is a directory for images. We pull a image that is to be used for the docker containers. Let’s first check the system for previous images:
You’ll get a empty list which means no images have been pulled yet.
Let’s pull redis using
docker pull redis
Now check again by typing the command:
And you should see redis listed
If you don’t want to pull the official images you can also do:
docker search redis
Which will give you alternatives.
You can pull the required image using the
docker pull catleops/redis.