Step one: Use yum to install (under centos 7)
docker requires the kernel version of the centos system Above 3.10, check the prerequisites on this page to verify whether your centos version supports docker.
Check your current kernel version through the uname -r command
Step 2: Install docker
docker software package and dependency packages are already included in the default centos-extras software source. The installation command is as follows:
Installation completed.
Step 3: Start docker background service
Step 4: Test run hello-world
Because there is no local Hello-world is the image, so a hello-world image will be downloaded and run in the container. Now let's start using it for real.
Step 1: Create an operating account to run docker Newly added - has nothing to do with the content of the following documents【Operation generally cannot be done with root】
The second step: start the operation and maintenance of docker
1. Run mvn install The project is packaged into a jar package
2. Copy the jar package to the currently created folder, and the dockerfile file to a folder
3. Enter the folder and run the command with or without version. It will be different! ! !
With the image generated by v1.0, I ran the wrong command like this:
The above is the detailed content of How to run springboot project with Linux Docker. For more information, please follow other related articles on the PHP Chinese website!