Skip to content

Instantly share code, notes, and snippets.

@64lines
Created June 28, 2017 20:48
Show Gist options
  • Select an option

  • Save 64lines/931472ac6a6266943863e85e710744a0 to your computer and use it in GitHub Desktop.

Select an option

Save 64lines/931472ac6a6266943863e85e710744a0 to your computer and use it in GitHub Desktop.
[Docker] Example Dockerfile
# Use an official Python runtime as a base image
FROM python:2.7-slim
# Set the working directory to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
ADD . /app
# Install any needed packages specified in requirements.txt
RUN pip install -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