FROM centos:latest MAINTAINER zhaozhong xing "xgrowingpains@gmail.com" #安装ssh和supervisor RUN yum install -y openssh-server httpd php php-gd lrzsz #SSH服务配置 RUN ssh-keygen -q -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N '' RUN ssh-keygen -q -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N '' RUN ssh-keygen -t dsa -f /etc/ssh/ssh_host_ed25519_key -N '' RUN sed -i "s/#UsePrivilegeSeparation.*/UsePrivilegeSeparation no/g" /etc/ssh/sshd_config RUN sed -i "s/UsePAM.*/UsePAM no/g" /etc/ssh/sshd_config RUN sed -i 's/#ServerName www.example.com:80/ServerName localhost:80/g' /etc/httpd/conf/httpd.conf
#开启gd RUN echo "[php.d]" >>/etc/php.ini RUN echo "include /etc/php.d/*.ini" >>/etc/php.ini RUN mkdir /var/www/html ADD www.zip /var/www/html #复制服务启动脚本并设置权限 ADD run.sh /usr/local/sbin/run.sh RUN chmod 755 /usr/local/sbin/run.sh #开放80端口 EXPOSE 22 80 8080 CMD ["/usr/local/sbin/run.sh"]
要开启gd服务才能出来图片