Question: what is the difference between run and cmd in dockerfile?
Answer: RUN and CMD are both Dockerfile instructions. RUN lets you execute commands inside of your Docker image. These commands get executed once at build time and get written into your Docker image as a new layer. ... CMD lets you define a default command to run when your container starts.