Data & configuration
Dockerfile
A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. Using docker build users can create an automated build that executes several command-line instructions in succession.
Share this starting point
code.study/dockerfile
- Created by
- Solomon Hykes
- First appeared
- 2013
- Official resource
- Visit the main website
Your first program
Hello, World!
# 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
# Run app.py when the container launches
CMD ["python", "app.py"]