DEV Community

Cover image for Setting Up Docker on Linux Apache AGE: A step-by-Step Guide
Muhammad Zeeshan
Muhammad Zeeshan

Posted on

Setting Up Docker on Linux Apache AGE: A step-by-Step Guide

In this blog we will look and explore about docker. How we can install it on linux Operating system and in next blogs we will look at how we can setup our developer environment to run Apache AGE image using docker.

Introduction

Docker is an open-source plateform for building, scaling, shipping and management of applications inside portable containers. Containers are basically isolated working environemnts that allows user to package their working application along with its required dependencies. And allow them to run it consistently across different devices having different working environemnt. It can be used for various purposes like application isolation, portability, version control,microservices and resource efficiency.

Installation

There are different ways to install dokcer on linux. You can check all those from docker official webiste. In this we will look at one of the easiet way to install.

Before installing docker for the first time on our machine. We need to setup docker repository. And after that we can install and update docker from the repository.

Step 1

Update the apt packages and install required dependencies.

sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
Enter fullscreen mode Exit fullscreen mode

Step 2

Add docker's official GPG key.

sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

Enter fullscreen mode Exit fullscreen mode

Step 3

Setup docker repository on your machine.

echo \
  "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Enter fullscreen mode Exit fullscreen mode

Step 4

Update the apt package index.

sudo apt-get update
Enter fullscreen mode Exit fullscreen mode

Everything is setup now. We only need to install the latest version of docker.

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Enter fullscreen mode Exit fullscreen mode

Command given above may take some time depending upon the network speed. After installation you can us docker.

Install Check

To check if it is successfully installed or not you can run this command.

sudo docker run hello-world
Enter fullscreen mode Exit fullscreen mode

Note
If you have any permission error or issues like this one

pemission issues

you need to create an account on docker hub.
After creating an account you can login using terminal.

docker login -u your_user_name
Enter fullscreen mode Exit fullscreen mode

It will ask for user password that you entered on the time of creation of account on docker hub. Provide that password. It will show login succeeded.

In the next blog we will look at how we can setup and use apache AGE using docker.

References

(https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository)
https://blog.idrisolubisi.com/how-to-fix-error-response-from-daemon-pull-access-denied-for-yourusernameyourrepository
https://www.australtech.net/top-tips-to-install-docker-on-ubuntu-18-04/

Top comments (0)