Add info about the Expose command (#11137)

This commit is contained in:
Usha Mandya
2020-07-15 11:36:51 +01:00
committed by GitHub
parent 23f23f0ad1
commit 675bdedd1f
2 changed files with 4 additions and 3 deletions

View File

@@ -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`.

View File

@@ -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.