dockerfile_basics.md (633B)
1 # dockerfile basics 2 3 /home/pyratebeard/src/udemy/docker_mastery/dockerfile-sample-1 4 5 * 'recipe' for creating images 6 * use `-f` to specify dockerfile 7 * must include `FROM` line to start 8 * to start with an empty container use `FROM scratch` 9 * each stanza is another layer in the cache 10 * point logs to `/dev/{stdout,stderr}` 11 * `EXPOSE` to open ports, still use `-p` 12 * `CMD` is required and is run when the container is launched 13 * `WORKDIR` better than using `cd` command 14 15 ## extending official samples 16 17 /home/pyratebeard/src/udemy/docker_mastery/dockerfile-sample-2 18 19 * inherit everything from `FROM` 20 * used `CMD` from building image