Start Apps Using Container
Learn how to start an app in a Docker container using Entrypoint, Cmd instructions, or CLI arguments.
We'll cover the following...
We'll cover the following...
In the previous lesson, we created a container running a web app. But how did the container know which app to start and how to start it?
Different ways to start an app in a container
There are three ways we can tell Docker how to start an app in a container:
- An Entrypointinstruction in the image
- A Cmdinstruction in the image
- A CLI argument
We’ll learn more about these in the next chapter, but the Entrypoint and Cmd instructions are optional image metadata that store the command Docker uses to start the default ...