2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【docker】Dockerfileについて

Posted at

概要

この記事ではDockerfileについてうろ覚えで書いておく。
新しい判明があったら随時更新する。

#Dockerfile
FROM : docker containerのベースを作成する
RUN : docker imageをビルドした際にコンソール上でコマンドを実行する
COPY : 指定したディレクトリに存在するファイルをdocker container内のディレクトリに複製する
CMD : docker containerを実行した際に自動でファイルを実行する

FROM python:3.6-alpine
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip pip install pyyaml

FROM python:3-onbuild
COPY ./test.py /python/

RUN apt-get update && apt-get install -y libopencv-dev 

RUN pip install --no-cache-dir --upgrade pip

RUN python3 -m pip install -r requirements.txt

CMD ["python", "./test.py"]
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?