DEV Community

Discussion on: Dockerize your React app

Collapse
 
karanpratapsingh profile image
Karan Pratap Singh

Hey, nice catch! yes it's a typo and should be 'AS', in dockerfile lowercase syntax also works exactly the same but it's not prefered..i'll update it to upper case..thank you

For the second question, docker automatically understands that "builder" is used inside the prod stage so it runs the builder first..so the seq of events are like this:

  1. looks in at the target, creates a dependency graph (what requires what)
  2. identifies that prod is relied on builder
  3. runs the builder first
  4. continues with the prod