diff --git a/slides/containers/Dockerfile_Tips.md b/slides/containers/Dockerfile_Tips.md index 6b402906..6e8082fe 100644 --- a/slides/containers/Dockerfile_Tips.md +++ b/slides/containers/Dockerfile_Tips.md @@ -66,9 +66,9 @@ Adding the dependencies as a separate step means that Docker can cache more effi ```bash FROM python -COPY requirements.txt /tmp/requirements.txt -RUN pip install -qr /tmp/requirements.txt WORKDIR /src +COPY requirements.txt . +RUN pip install -qr requirements.txt COPY . . EXPOSE 5000 CMD ["python", "app.py"] diff --git a/slides/containers/Multi_Stage_Builds.md b/slides/containers/Multi_Stage_Builds.md index d2bbd782..f944f17f 100644 --- a/slides/containers/Multi_Stage_Builds.md +++ b/slides/containers/Multi_Stage_Builds.md @@ -298,21 +298,20 @@ virtually "free." ## Build targets -* We can also tag an intermediary stage with `docker build --target STAGE --tag NAME` +* We can also tag an intermediary stage with the following command: + ```bash + docker build --target STAGE --tag NAME + ``` * This will create an image (named `NAME`) corresponding to stage `STAGE` * This can be used to easily access an intermediary stage for inspection - (Instead of parsing the output of `docker build` to find out the image ID) + (instead of parsing the output of `docker build` to find out the image ID) * This can also be used to describe multiple images from a single Dockerfile - (Instead of using multiple Dockerfiles, which could go out of sync) - -* Sometimes, we want to inspect a specific intermediary build stage. - -* Or, we want to describe multiple images using a single Dockerfile. + (instead of using multiple Dockerfiles, which could go out of sync) ???