7
8

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 5 years have passed since last update.

自分のDockerイメージをさらしてみる

Last updated at Posted at 2015-12-04

Docker歴1ヶ月くらいですが、Docker Hubの自作のイメージを紹介します。Dockerのインストールについては、DockerでJupyterを起動するまでをどうぞ。

全てKitematicで簡単に実行できます。

ついでにDockerfileも説明します。

init.shを使っているのは、Windowsで、*.ipynbファイルを編集できるようにするためと、直接CMDだと失敗したからです。

standard/Dockerfile
FROM tsutomu7/py3sci

RUN pip install ortoolpy
EXPOSE 8888
VOLUME ["/jupyter"]
WORKDIR /jupyter
COPY *.ipynb /root/tmp/
COPY data/ /root/tmp/data/
COPY init.sh /root/
CMD ["sh", "/root/init.sh"]
standard/init.sh
mv /root/tmp/* /jupyter
jupyter notebook --ip=* --no-browser
puzzle/Dockerfile
FROM debian:jessie

RUN apt-get update --fix-missing && apt-get install -y wget bzip2 ca-certificates \
    libglib2.0-0 libxext6 libsm6 libxrender1 && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*
ENV PATH /opt/conda/bin:$PATH
ENV LANG C.UTF-8
ENV MINICONDA Miniconda3-3.18.3-Linux-x86_64.sh
RUN echo 'export PATH=/opt/conda/bin:$PATH' > /etc/profile.d/conda.sh && \
    wget --quiet https://repo.continuum.io/miniconda/$MINICONDA && \
    bash /$MINICONDA -b -p /opt/conda && \
    rm $MINICONDA && \
    conda install -y conda==3.18.3 && \
    conda update -y conda && \
    conda install -y jupyter && \
    pip install pulp unionfind && \
    rm -rf /opt/conda/pkgs/*
EXPOSE 8888
VOLUME ["/jupyter"]
WORKDIR /jupyter
COPY data /root/tmp/data/
COPY pic /root/tmp/pic/
COPY *.ipynb /root/tmp/
COPY init.sh /root/
CMD ["sh", "/root/init.sh"]
puzzle/init.sh
mv /root/tmp/* /jupyter
jupyter notebook --ip=* --no-browser
gotour/Dockerfile
FROM alpine

ENV GOPATH=/root/go
RUN apk add --update go git && \
    mkdir /root/go && \
    go get golang.org/x/tour/gotour && \
    apk del git && \
    rm /var/cache/apk/* 
EXPOSE 8080
CMD ["/root/go/bin/gotour", "-http", "0.0.0.0:8080"]
alpine-python3/Dockerfile
FROM alpine

ENV BLAS /usr/local/lib/libfblas.a
ENV LAPACK /usr/local/lib/liblapack.a
RUN apk add --update musl python3-dev freetype-dev make g++ gfortran wget && \
    cd /tmp && wget -q --no-check-certificate \
        https://raw.githubusercontent.com/catholabs/docker-alpine/master/blas.sh \
        https://raw.githubusercontent.com/catholabs/docker-alpine/master/blas.tgz \
        https://raw.githubusercontent.com/catholabs/docker-alpine/master/lapack.sh \
        https://raw.githubusercontent.com/catholabs/docker-alpine/master/lapack.tgz \
        https://raw.githubusercontent.com/catholabs/docker-alpine/master/make.inc \
        http://dl.ipafont.ipa.go.jp/IPAexfont/ipaexg00301.zip && \
    sh ./blas.sh && sh ./lapack.sh && \
    cp ~/src/BLAS/libfblas.a /usr/local/lib && \
    cp ~/src/lapack-3.5.0/liblapack.a /usr/local/lib && \
    pip3 install -U pip && \
    pip install numpy==1.9.3 && \
    pip install scipy matplotlib jupyter networkx pandas \
        scikit-learn blist bokeh statsmodels seaborn dask sympy && \
    unzip -q ipaexg00301.zip && \
    mv ipaexg00301/ipaexg.ttf /usr/lib/python3.4/site-packages/matplotlib/mpl-data/fonts/ttf/ && \
    rm -rf /var/cache/apk/* /tmp/* /root/src/
CMD ["sh"]
7
8
2

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
7
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?