Open2

Dockerfile 基礎

masayukeeeeemasayukeeeee

基本的な要素

FROM [image]

RUN [shell script]

WORKDIR [default working directory]

COPY [local-path] [container-path]

ENTORYPOINT [kernel]

CMD [argment for kernel]
masayukeeeeemasayukeeeee

具体例

FROM ubuntu:18.04

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

WORKDIR /app

COPY ./requirements.txt requirements.txt

RUN pip3 install -r requirements.txt

COPY . .

ENTRYPOINT ["python3"]

CMD ["app.py"]