可以在dockerhub上找下anaconda的容器,比如这个anaconda镜像提供的,anaconda版本是2.4.* ~ 4.1.0之间都是默认py35的,这里提供的是基于debian的镜像。
直接在提供的dockerfile的基础上修改,自己构建镜像,我用的如下:
FROM ubuntu:16.04
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
ENV PATH /opt/conda/bin:$PATH
RUN apt-get update --fix-missing && apt-get install -y wget bzip2 ca-certificates \
libglib2.0-0 libxext6 libsm6 libxrender1
RUN wget --quiet https://repo.anaconda.com/archive/Anaconda3-4.1.0-Linux-x86_64.sh -O ~/anaconda.sh && \
/bin/bash ~/anaconda.sh -b -p /opt/conda && \
rm ~/anaconda.sh && \
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
echo "source activate root" >> ~/.bashrc
CMD [ "/bin/bash" ]
构建完运行