Run a Docker image as a container

后端 未结 11 2042
终归单人心
终归单人心 2020-12-04 04:27

After building a Docker image from a dockerfile, I see the image was built successfully, but what do I do with it? Shouldn\'t i be able to run it as a container

11条回答
  •  自闭症患者
    2020-12-04 05:04

    • To list the Docker images

      $ docker images
      
    • If your application wants to run in with port 80, and you can expose a different port to bind locally, say 8080:

      $ docker run -d --restart=always -p 8080:80 image_name:version
      

提交回复
热议问题