Docker Files and Semantics

Portable Self-Contained Execution Enviornment

Docker File

Getting started

Running Server

Previewing Application

Capturing Image

Docker File Example

FROM ubuntu:16.04

MAINTAINER Leon Hunter "leon@notarealemail.com"

RUN apt-get update -y && \
    apt-get install -y python-pip python-dev

COPY ./requirements.txt /app/requirements.txt

WORKDIR /app

RUN pip install -r requirements.txt

COPY . /app

EXPOSE 8080

ENTRYPOINT [ "python" ]
CMD [ "app.py" ]

FROM ubuntu:16.04
Explained

FROM ubuntu:16.04
Explained

Continued

FROM ubuntu:16.04
Explained

Continued

LABEL (Formally MAINTAINER)
Explained

RUN
Explained

RUN
Explained

Continued

COPY
Explained

WORKDIRECTORY
Explained

RUN
Explained

COPY
Explained

COPY
Explained

Continued

ENTRYPOINT
Explained

COMMAND
Explained

COMMAND vs ENTRYPOINT
Explained