常用Dockerfile举例

FROM ubuntu:14.04
MAINTAINER sss ENV JAVA_HOME /opt/jdk RUN \
echo 'export PATH=$JAVA_HOME/bin:$PATH' >> /root/.bashrc
ADD jdk /opt/jdk
FROM ubuntu:python

MAINTAINER yuncun

RUN apt-get update

RUN \
apt-get install -y python-pip && \
apt-get install -y python-numpy && \
apt-get install -y python-scipy && \
pip install -U scikit-learn
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
FROM ubuntu:14.04

MAINTAINER yuncun

ENV PYTHONPATH /usr/bin/python

# Install python
RUN \
apt-get install -y python && \
echo 'export PATH=$PYTHONPATH:$PATH' >> /root/.bashrc
上一篇:花20分钟写的-大白话讲解如何给github上项目贡献代码


下一篇:Saltstack_使用指南07_远程执行-执行模块