Delete
Setting
Add New Item
Menu List
Title | Content Type | Order | Action | ||||||
---|---|---|---|---|---|---|---|---|---|
{{kb_content.name}} {{kb_content.name}} | {{setValue(content_types, kb_content.content_type)}} | {{kb_content.sort_order}} | Preview Edit Edit Content | ||||||
{{kb_content.name}} | {{setValue(content_types, kb_content.content_type)}} | {{kb_content.sort_order}} | Preview Edit Edit Content | ||||||
No record |
Docker install, docker command and Issues
You are new to Linux and switch to the Linux Operating System, this is a tutorial for you. This will help you to start your journey in the Linux system because when you perform daily operations in this system, you will not stack on it.
After installing the OS, we need some basic applications to do our daily operation such as browser, zoom, skype. If we are a developer then we need some development tools like Node.Js and NPM, PHP, phpMyAdmin, MySQL, Apache, Tomcat, DBreaver etc. This tutorial will cover all of this.
Important thing is when you enable the installation of those applications, you will learn many things regarding Linux OS.
Docker is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers. The service has both free and premium tiers. The software that hosts the containers is called Docker Engine.
Step 1: Uninstall old versions and Update OS
Older versions of Docker were called docker, docker.io, or docker-engine. If these are installed, uninstall using following command:
sudo apt-get remove docker docker-engine docker.io containerd runc
It’s OK if apt-get reports that none of these packages are installed.
Check if the system is up-to-date using the following command:
sudo apt-get update
Step 2: Install Docker
Now, Install docker by the following command-
sudo apt install docker.io
Step 3: Install all the dependency packages
sudo snap install docker
Step 4: Check the version
Before going to work with Docker, check the version installed using the following command:
docker --version
This will shows as like if Docker is installed successfully
Docker version 20.10.12, build e91ed57
Step 5: hello-world Image:
Pull hello-world image from the Docker hub using the following command:
sudo docker run hello-world
Here, hello-world is the docker image present on the Docker hub.
This is all about installing docker on Ubuntu.
Docker Commands:
There is some command regarding Docker:
- Check Docker pulled images
By following command, you can check the docker image has been pulled and is present in your system -
sudo docker images
- Display all the containers pulled
To display all the containers pulled, use the following command:
sudo docker ps -a
- Check for containers
To check for containers in a running state, use the following command:
sudo docker ps
Issues:
Issue 1:
If following comment executing, shows message: permission denied,
docker image ls
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/json": dial unix /var/run/docker.sock: connect: permission denied
For remedy this, you have add group:
sudo groupadd docker
groupadd: group 'docker' already exists
sudo usermod -aG docker $USER newgrp docker
after that, run command again
docker image ls
Output:
REPOSITORY TAG IMAGE ID CREATED SIZE hello-world latest feb5d9fea6a5 3 months ago 13.3kB php 5.6-fpm 3458979c7744 2 years ago 344MB
...............
Thanks