From acc1814034398320bba91ed0e6a8ba470a97cc62 Mon Sep 17 00:00:00 2001 From: Michael Scalzetti Date: Sun, 8 Jan 2023 16:30:54 -0500 Subject: [PATCH] added dockerfile and docker-compose cheat sheet entries --- blog/src/docker/docker-compose.md | 3 ++ blog/src/docker/dockerfile.md | 85 +++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 blog/src/docker/docker-compose.md create mode 100644 blog/src/docker/dockerfile.md 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 + + +