Dockerfile

docker系列文章:https://www.jianshu.com/nb/30096674

Dockerfile 使用

docker build
如:docker build -t runoob/centos:6.7

Dockerfile示例

1
2
3
4
5
6
7
8
9
10
FROM    centos:6.7
MAINTAINER Fisher "fisher@sudops.com"

RUN /bin/echo 'root:123456' |chpasswd
RUN useradd abcdef
RUN /bin/echo 'abcdef:123456' |chpasswd
RUN /bin/echo -e "LANG=\"en_US.UTF-8\"" >/etc/default/local
EXPOSE 22
EXPOSE 80
CMD /usr/sbin/sshd -D