打印

基于军哥1.3版的dockerfile,感谢军哥,对docker感兴趣的可以一起来讨论啊,还有很多要完善的地方,安装还是要进入容器里面才行。

基于军哥1.3版的dockerfile,感谢军哥,对docker感兴趣的可以一起来讨论啊,还有很多要完善的地方,安装还是要进入容器里面才行。

FROM ubuntu
MAINTAINER zywinner168 <zywinner168@gmail.com>

RUN echo "deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse">> /etc/apt/sources.list
RUN echo "deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse">> /etc/apt/sources.list
RUN echo "deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse">> /etc/apt/sources.list
RUN echo "deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse">> /etc/apt/sources.list
RUN echo "deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse">> /etc/apt/sources.list
RUN echo "deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse">> /etc/apt/sources.list
RUN echo "deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse">> /etc/apt/sources.list
RUN echo "deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse">> /etc/apt/sources.list
RUN echo "deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse">> /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y openssh-server
RUN mkdir -p /var/run/sshd
RUN mkdir -p /opt/tools/
RUN echo "Asia/shanghai" > /etc/timezone
RUN echo "root:abcd1234" | chpasswd
RUN apt-get install -y vim wget curl

RUN wget -P /opt/tools/ http://soft.vpser.net/lnmp/lnmp1.3-full.tar.gz
RUN mkdir -p /opt/tools/soft.vpser.net/lnmp/
RUN tar -xzvf /opt/tools/lnmp1.3-full.tar.gz -C /opt/tools/soft.vpser.net/lnmp/

ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8

CMD ["/usr/sbin/sshd", "-D"]
#CMD ["/opt/tools/soft.vpser.net/lnmp/lnmp1.3-full/install.sh"]
EXPOSE 22
EXPOSE 80

TOP

一些用完后不需要的依赖包的清理还有下载的lnmp包的清理,这些都没有,还有就是版本的选择!

TOP