From 675bdedd1f12dce45c4e2ef9a6e0b2510019bc22 Mon Sep 17 00:00:00 2001 From: Usha Mandya <47779042+usha-mandya@users.noreply.github.com> Date: Wed, 15 Jul 2020 11:36:51 +0100 Subject: [PATCH] Add info about the Expose command (#11137) --- compose/gettingstarted.md | 5 +++-- get-started/part2.md | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/compose/gettingstarted.md b/compose/gettingstarted.md index 2664c71d04..fb0e7b0a38 100644 --- a/compose/gettingstarted.md +++ b/compose/gettingstarted.md @@ -89,8 +89,8 @@ following: RUN apk add --no-cache gcc musl-dev linux-headers COPY requirements.txt requirements.txt RUN pip install -r requirements.txt - COPY . . EXPOSE 5000 + COPY . . CMD ["flask", "run"] This tells Docker to: @@ -98,8 +98,9 @@ This tells Docker to: * Build an image starting with the Python 3.7 image. * Set the working directory to `/code`. * Set environment variables used by the `flask` command. -* Install gcc so Python packages such as MarkupSafe and SQLAlchemy can compile speedups. +* Install gcc and other dependencies * Copy `requirements.txt` and install the Python dependencies. +* Add metadata to the image to describe that the container is listening on port 5000 * Copy the current directory `.` in the project to the workdir `.` in the image. * Set the default command for the container to `flask run`. diff --git a/get-started/part2.md b/get-started/part2.md index 994b32210d..5015cd0cc0 100644 --- a/get-started/part2.md +++ b/get-started/part2.md @@ -161,7 +161,7 @@ COPY package.json . # Run the command inside your image filesystem. RUN npm install -# Inform Docker that the container is listening on the specified port at runtime. +# Add metadata to the image to describe which port the container is listening on at runtime. EXPOSE 8080 # Run the specified command within the container.