How to build a new mirror from an existing mirror without using Dockerfile

  docker, question

For example, I usedocker hubThe Debian official image of creates a container, then enters the container update, then deploys a nginx service, sets the self-start in rc.local, then exits the container and returns the containercommitA new image a was created. After that, I tried to start a container from image A but found that the startup failed.docker run -dAfterdocker psThere is no such container in the container.docker run -itAfter exiting the container, the container is closed. What is the reason? Please answer, thank you.
Dockerfile is not yet in good hands.

A container needs a service to run, and the official recommendation is to run only one service per container.

All Dockerfile have CMD or ENTRYPOINT after them. If you want to run your image in the background, run -d is followed by a command or program that can last.