Docker Climbing Guide && Getting Started with Ubuntu

Dark horse programmer docker tutorial

Everyone will encounter different problems in different environments, and this guide is for reference only. I still hope to point out the inaccuracies.
The article is a bit miscellaneous and numerous, because this article looks at the problem from the perspective of a novice. If you encounter something you don't understand, you will consult the information, and supplements will be provided on it.
The operating environment of this article is Ubuntu Kylin, and the kernel is ubuntu22.04

1 docker download under ubuntu system

Yum is generally used in centos, and ubuntu can use the apt command directly.
Use directly:apt-get install docker

2 Administrator privileges

sudo is to run commands with administrator privileges.
For example: input directly docker images, an error occurs: Got permission denied while trying to connect to the Docker daemon socket at uni...
Correction:sudo docker images

Extension: Execute commands on the terminal as an administrator
1, add sudo before other commands with sudo
2, enter root authority with su, and execute commands as an administrator (the password of su is the password of root, and the password of sudo is the password of the user password)
3. New users need to set root password
Linux - root initial password setting
4. After entering root, the input line is not highlighted,
Linux has no color after switching to root user
The root password is set successfully

3 /bin/bash reports an error

insert image description here
What is bash?
Bash, a Unix shell, was written by Brian Fox in 1987 for the GNU project. The first official version was released in 1989. It was originally planned to be used on the GNU operating system, but it can run on most Unix-like operating systems, including Linux and Mac OS X v10.4, which use it as the default shell.
Bash is a command processor that usually runs in a text window and can execute commands directly entered by the user. Bash can also read commands from files, such files are called scripts (shells).

This problem extends to many problems, such as: various errors in creating containers, insufficient permissions, access denial, etc.
Root cause: The images I used when I was studying came with the system when I installed it.
Solution: install the mirror image of the course (centos)

4 ll command

In Linux, the "ll" command refers to the "ls -l" command, which is an alias for the "ls -l" command, which is used to display a list of contents under a directory in long format; the output information is in order from left to right Including file name, file type, permission mode, number of hard links, owner, group, file size and file last modification time, etc.

When entering the container, the 'll' command is not recognized. Then use the full name directly to 'ls -l'. The 'll' command can be recognized because this command is configured in some environments, so that ll=ls -l
insert image description here

5 warnings on exiting docker

insert image description here
Solution

The ll command knows that there are still residual
insert image description here

Guess you like

Origin blog.csdn.net/private_Jack/article/details/127221060