Chapter06 Docker For Python
はじめに
Dockerファイル
➜ mkdir python_docker
➜ mkdir Python_mounted_dir
➜ cd python_docker
➜ touch Dockerfile# Base image
FROM ubuntu:18.04
# Update
RUN set -x && \
apt update && \
apt upgrade -y
# Install util
RUN set -x && \
apt install -y wget && \
apt install -y sudo
# Install anaconda
# -b : batch mode
RUN set -x && \
wget https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh && \
bash Anaconda3-2020.02-Linux-x86_64.sh -b && \
rm Anaconda3-2020.02-Linux-x86_64.sh
# Path setting
ENV PATH $PATH:/root/anaconda3/bin
WORKDIR /root
# Install python library
ADD requirements.txt /root
RUN pip install -r requirements.txt
# Set root directory
WORKDIR ../
Last updated