dockerfile basics
/home/pyratebeard/src/udemy/docker_mastery/dockerfile-sample-1
- 'recipe' for creating images
- use
-fto specify dockerfile - must include
FROMline to start- to start with an empty container use
FROM scratch
- to start with an empty container use
- each stanza is another layer in the cache
- point logs to
/dev/{stdout,stderr} -
EXPOSEto open ports, still use-p -
CMDis required and is run when the container is launched -
WORKDIRbetter than usingcdcommand
extending official samples
/home/pyratebeard/src/udemy/docker_mastery/dockerfile-sample-2
- inherit everything from
FROM- used
CMDfrom building image
- used