docker练习

这篇博客介绍了使用Docker进行实践操作,包括安装运行nginx、tomcat和elasticsearch,详细讲述了常规创建及如何修改环境变量降低内存消耗。进一步探讨了通过Dockerfile构建centos镜像,详细步骤包括编写配置文件、构建镜像、运行镜像以及查看镜像构建历史。最后,博主分享了如何部署redis集群。
摘要由CSDN通过智能技术生成

练习

docker 安装运行nginx

docker run nginx   #下载最新
docker run -d --name nginx01 -p 8888:80 nginx  #创建容器,暴露端口8888
curl localhost:8888  #查看nginx运行请看
`
zkf@zkf-ThinkPad-T490:/home$ curl localhost:8888
<!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/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
<</
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值