diff --git a/blog/src/docker/docker-compose.md b/blog/src/docker/docker-compose.md new file mode 100644 index 0000000..3f0a12f --- /dev/null +++ b/blog/src/docker/docker-compose.md @@ -0,0 +1,3 @@ +# Dockerfile Cheat Sheet + +Coming soon... diff --git a/blog/src/docker/dockerfile.md b/blog/src/docker/dockerfile.md new file mode 100644 index 0000000..2d94a0b --- /dev/null +++ b/blog/src/docker/dockerfile.md @@ -0,0 +1,85 @@ +# Dockerfile Cheat Sheet + +## Starting Point + +Arguments that dictate what to use as a starting point for the dockerfile + +### FROM + +Specifies what image to use as a base + +Usage: +``` +FROM +FROM : +FROM @ +``` +Notes: +- **From is a required argument, and must come first** +- If no tag is specified, the "latest" tag will be used + + +## Metadata + +Arguments that don't affect how the image builds or container runs, but give information about the image + +### MAINTAINER + +Allows you to specify an author + +Usage: +``` +MAINTAINER +``` + +## Setup + +### ENV + + +### ADD + + +### WORKDIR + +### SHELL + +Command to change the shell that RUN uses + +Usage: +``` +SHELL ["", "", "", ...] +``` +Notes: +- Only changes shell for following RUN commands, you can switch between shells if you so desire + + +## Build + +### RUN + +Command to run in order to build the image + +Usage: +``` +RUN +RUN ["", "", "", ...] +``` + +Notes: +- The build will fail if a run command returns a non-zero code +- Runs with the "default shell" (can be changed with the SHELL command) + + + +### CMD + + +### + +## Running + +### EXPOSE + + +