1. Package the Spring Boot project into a JAR package

2. Create a folder on the server to store the JAR package

  1. The packaged JAR package is sent to the server using Xshell

    Note: To create a new session on Xshell, enter the command rz-y. Select the file to upload

  2. Create a dockerFile file under the folder we created in step 2.

Note: The contents of a dockerfile file vary depending on your situation

  1. View the contents contained in the hellowDocker folder

6. Create an image

7. Check whether the image is successfully created

8. Start the container

Note: the -d parameter is used to run the container in the background. -p is used to map port 8087 in the server to port 8087 in the container (port 8087 is configured in the project)

9. Check whether the test is successful in the browser (server IP: port number/method path in the project)

This has been done successfully.