使用dockerfile构建nginx镜像的方法示例

2020-06-17 07:13:35易采站长站整理


[root@docker ~]# docker exec -it nginx bash
[root@ecaafe119044 /]# nginx
[root@ecaafe119044 /]# exit
exit


[root@docker ~]# curl 192.168.100.22
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/" rel="external nofollow" >nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/" rel="external nofollow" >nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>

这样! nginx镜像就购将成功了!!!!

您可能感兴趣的文章:使用Dockerfile部署nodejs服务的方法步骤Docker使用编写dockerfile启动node.js应用基于alpine用dockerfile创建的tomcat镜像的实现基于alpine用dockerfile创建的爬虫Scrapy镜像的实现docker Dockerfile文件制作自己的镜像的方法docker使用Dockerfile构建镜像的方法利用Dockerfile制作java运行环境的镜像的方法步骤Dockerfile中常用命令汇总使用Docker run的选项以覆盖Dockerfile中的设置详解Dockerfile指令与基本结构的讲解