Skip to content

Instantly share code, notes, and snippets.

@securetorobert
Created August 15, 2019 12:07
Show Gist options
  • Save securetorobert/5b7b9def338247a74564a9c485fbcdfa to your computer and use it in GitHub Desktop.
Save securetorobert/5b7b9def338247a74564a9c485fbcdfa to your computer and use it in GitHub Desktop.
A Dockerfile Sample
# Use an official Python runtime as a parent image
FROM python:2.7-slim
# Set the working directory to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Install any needed packages specified in requirements.txt
RUN pip install --trusted-host pypi.python.org -r requirements.txt
# Make port 80 available to the world outside this container
EXPOSE 80
# Define environment variable
ENV NAME World
# Run app.py when the container launches
CMD ["python", "app.py"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment