From 5458e78474dc66906fabdec51f8ea90fde74c9bc Mon Sep 17 00:00:00 2001 From: Craig Pastro <38416546+cpastro@users.noreply.github.com> Date: Mon, 13 Aug 2018 15:16:18 +0900 Subject: [PATCH] Change ADD to COPY MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to "Best practices for writing Dockerfiles" COPY is preferred "because it’s more transparent than ADD". --- get-started/part2.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/get-started/part2.md b/get-started/part2.md index c1e6ec41ac..2b1c3c6ebe 100644 --- a/get-started/part2.md +++ b/get-started/part2.md @@ -69,7 +69,7 @@ FROM python:2.7-slim WORKDIR /app # Copy the current directory contents into the container at /app -ADD . /app +COPY . /app # Install any needed packages specified in requirements.txt RUN pip install --trusted-host pypi.python.org -r requirements.txt @@ -92,7 +92,7 @@ This `Dockerfile` refers to a couple of files we haven't created yet, namely Create two more files, `requirements.txt` and `app.py`, and put them in the same folder with the `Dockerfile`. This completes our app, which as you can see is quite simple. When the above `Dockerfile` is built into an image, `app.py` and -`requirements.txt` is present because of that `Dockerfile`'s `ADD` command, +`requirements.txt` is present because of that `Dockerfile`'s `COPY` command, and the output from `app.py` is accessible over HTTP thanks to the `EXPOSE` command.