Skip to main content

How to install docker on Ubuntu 20.04 LTS

In this article i will explain how you can install Docker on UBUNTU 20.04 LTS

To learn more about docker please visit official site


First make sure you will have installed all the updates


sudo apt update -y
Then install docker by running simple command
sudo apt install docker.io
Then make sure docker starts after computer restarts
sudo systemctl enable --now docker
At this opint root user is able to run docker command, but any other user wont be able to use docker. To give permission to any user or current user run
# Current user
sudo usermod -aG docker $USER

#Any other user
sudo usermod -aG docker SOMEUSERNAME

Now you can check docker version
docker version
Restart your compuer so that any user added to added group can run docker command. Now you should be able to run any docker image, here is a simple example

docker run hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

Comments

Popular posts from this blog

How to add custom user attributes in keycloak and access them in spring boot application

Sometime it may be possible you want to add more parameters to standard registration page of keyloak for your users and aaccess that data in your spring boot application. This artical will show step by steps on how to add such extra attributes.

What is KeycloakKeycloak is an open source software product to allow single sign-on with Identity Management and Access Management aimed at modern applications and services, to learn more visit https://www.keycloak.org/



What is Spring bootSpring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run". To learn more visit https://spring.io/projects/spring-boot


To add an extra attribute in keyclkoak server you will need to edit actuall html template and then registaer new attribute in json response so that it will be available on client.


Edit HTML template
Lets assume we want to add mobile number on default registration page.

Go to Keycloak home installation directoryedit file theme/base/lo…

How to create Spring boot cloud config server

What is Spring boot cloud config server?Spring Cloud Config Server provides an HTTP resource-based API for external configuration (name-value pairs or equivalent YAML content). The server is embeddable in a Spring Boot application, by using the @EnableConfigServer annotation. Consequently, the following application is a config server
In Simple terms, Spring boot cloud config server takes your application.yml or application.properties from your spring boot application and serve it over HTTP, and spring application which need to use it just need to delete the application.yml or application.properties and create one bootstrap.yml/properties and defined 2 simple properties spring.application.name and spring.cloud.config.uri



Create New java project using one of following instructions.Create project with Java, maven and Intellij
Edit POM.xml, add following content in pom.xmlFirst specify the packaging
jar
also add parent of this pom to be
NOTE: You can lookup the latest version for parent from h…

How to create java maven project in intelij

Open intellijCreate a new java maven project in intellij.


Select Maven type, Select JDK you want to use and click Next.
Enter GroupId and ArtifactId, click Next
Select project Location and click finish

Intelij will display a warning, just press Ok.


Once project is created , a popup may appear asking for auto import, select "Enable Auto Import" You will have a project created, looking something like this
Note: I have created these instructions using, Instruction for other OS or intellij Version shouldn't be much different, if you need instruction for other version leave a comment and i will try to come up with another set of instructions.
Intellij 2017.2.1 Java 1.8 Mac OS