The project on the server couldn’t be accessed, so I checked the container and sure enough

Docker rm container ID

docker rm f097e24a9a0f

From the image to the container, the same image to build multiple running Docker entities — container, image provides the container runtime required procedures, libraries, resources, configuration and other files, but also contains some configuration parameters for the runtime. A mirror is a static concept, it does not contain any dynamic data, and its content does not change after the build.

You can look at the mirror image

You can see the warehouse, label, ID, creation time and size

Run a container containing a main process from an image: docker run-ti –name mall_mall-portal_1 mall/mall-portal: 1.0-snapshot bash

Command explanation:

  • Docker run is an instruction to run a container from an image.
  • The -ti parameter is used to enter the terminal interactive of the container.
  • –name specifies the name of the container, mall_mall-portal_1 is the name we gave the container.
  • Mall /mall-portal: 1.0-snapshot is fatal from which image to run the container, mall/mall-portal is the warehouse name, and 1.0-snapshot is the label.
  • Bash indicates that we are using the bash terminal.

Terminal:

  1. A terminal, also known as a command terminal, is the window through which users enter shell commands, similar to the DOS interface in Windows.
  2. Shell is the shell between the user and the operating system. Intermediary, GUI and CLI are all shells. The terminal can be logged in Bash or Csh or Dash. It is the interface between the operating system and the user. You can use shell in the command terminal. The shell translates user input into instructions that the operating system can process. The shell provides some built-in commands, as well as support for calling external tools.
  3. Dash is the default shell in Ubuntu. In addition to the default POSIX standard, shells support different extension syntax. By far the most commonly used is Bash, and many shell tutorials are dedicated to bash. Dash isn’t really that different from Bash, except that it doesn’t support arrays. Ubuntu can change the default shell from Dash to bash.

Docker Ps-a check again

The container has been created, but still

This I refuse to accept, delete mirror, do again

Before deleting an image, you must delete the container

View images: Docker Images

View containers:

docker ps -a

The container and image have been deleted

Now import the image again

Add similar ones to the project’s POM.xml

Perform operations

View the imported image

Performed again

Look again at

Oh, my god. I’m gonna blow

Revive the “bear” heart

See the log

Find the error message

This is strange, my project is running without error

Error message:

Unable to resolve placeholder ‘accesskeyID’ in value ‘$accessKeyID’

The first thought was that there were multiple properties files, but the project ran in the browser without error and could be registered, indicating that it was readable

Project Contents:

AccessKeyId = accessKeyId = accessKeyId = accessKeyId = accessKeyId = accessKeyId = accessKeyId = accessKeyId = accessKeyId = accessKeyId = accessKeyId = accessKeyId = accessKeyId = accessKeyId = accessKeyId

As a dead end, the accessKeyId data from Accesskey. properties is written to the business before re-uploading the image to the import container

You can see that the container is created

Turn everything off and restart

Error message: Unable to create container for service mall portal: B ‘conflict. Container name “89 f8c97537eba05840bb0809441e4f16bc3875f0124309088eb771c0d9ee039” has been “89 f8c97537eb05840bb0809441e4f16bc3875f012430 9088 eb771c0d9ee039 “use. You must delete (or rename) the container to reuse the name.”