以centos为基础镜像,封装了一个httpd,写入了暴露的端口,规定了工作目录并且与物理机进行绑定。
65
使用centos镜像作为基础镜像进行封装了一个httpd,默认主目录为here is xcn-image-httpd。源码如下:
FROM centos:run MAINTAINER xcn [email protected] CMD yum -y install httpd && echo "here is xcn-image-httpd" > /var/www/html/index.html && httpd && touch /root/abc && tail -f /root/abc EXPOSE 80 EXPOSE 443 WORKDIR /var/www/html VOLUME /var/www
Content type
Image
Digest
Size
72.6 MB
Last updated
over 4 years ago
docker pull xcnlinux/httpd:1.0