Hello everyone, I am chu Chen, this chapter we learn Docker installation and simple use. Questions and comments can be sent to [email protected]
One: Install Docker
1: What is a Docker?
Docker is an open source application container engine that allows developers to package their applications and dependencies into a portable container and then distribute them to any popular Linux machine, as well as virtualization. Containers are completely sandboxed and have no interface with each other.
2: Download and install Docker
1. Open Docker Toolbox
Download the version suitable for your computer system, and then install Next
If the installation is successful, the following information is displayed
Click on the Docker Quickstart Terminal in the middle
The following figure shows successful installation
Note: Remember the green IP address for later use
Note: If you installed Git before installing Docker
Windows is looking for bash.exe. If you want to find the file yourself, please click on the “Browse” question
Right click on the icon and select Properties
Install RabbitMQ using Docker
Docker pull the rabbitmq: 3.7.15 - management
Docker pull rebbitMQ is the name of the pull image. Latest is the latest version
The picture is shown after the download is successful
4: View the installed Docker image
docker images
You can see RabbitMQ has been installed successfully
5: Start RabbitMQ
$ docker run -d --hostname rabbit-host --name rabbitmq -e RABBITMQ_DEFAULT_USER=user -eRABBITMQ_DEFAULT_PASS=password -p 15672:15672 -p 5672:5672 rabbitMQ :3.7.15- ManagementCopy the code
After successful startup, the following figure is shown
6: Access the RabbitMQ management page
The browser enter http://192.168.99.100:15672/
Note: THE IP address is the one shown in green when Docker is started
The following page is displayed:
Enter the user and password we set when we started Docker
OK, the startup is successful
Common Docker commands
$docker stop containerId // containerId is the ID of the container $docker ps-a// View all containers $docker ps-a-q $docker stop $(docker ps-a-q) // stop Stop all containers $docker rm $(docker ps)-a-q) // remove remove all containers $docker images-a// View all containersCopy the code
Four: the ending
Thank you for your support, and this series of articles will continue to be updated. Thank you.
For springBoot do not know friends can see my springBoot series tutorial