Hi @dryluigi, thanks for the feedback!
The command to run is defined in the ENTRYPOINT line.
In the dockerfile we can specify how to run the app through either of these 2 options: CMD or ENTRYPOINT.
The ENTRYPOINT one is prefered if you have an specific built entrypoint to run the app, which in our case we have the air to run on dev mode and the todo built file if we want to run a production version. This option is good for apps that generate a build file, like Golang or Java apps for example.
The CMD is used when you want to define a default command that can be overridden or extended by whoever wants to use this file. In Node.js applications for example you might have a: CMD ['npm', 'start'].
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi @dryluigi, thanks for the feedback!
The command to run is defined in the
ENTRYPOINT
line.In the dockerfile we can specify how to run the app through either of these 2 options: CMD or ENTRYPOINT.
The ENTRYPOINT one is prefered if you have an specific built entrypoint to run the app, which in our case we have the
air
to run on dev mode and thetodo
built file if we want to run a production version. This option is good for apps that generate a build file, like Golang or Java apps for example.The CMD is used when you want to define a default command that can be overridden or extended by whoever wants to use this file. In Node.js applications for example you might have a:
CMD ['npm', 'start']
.