快速学习Source-to-Image (S2I) (二)

此示例显示了如何构建:
来自Red Hat Container Registry中可用的registry.redhat.io/rhel8/nginx-116:latest构建器的新容器镜像,以及一个测试应用程序,可从gitee nginx-container存储库中的公共Git存储库中的1.16/test/test-app/目录中获得。

安装S2I tool

Install the S2I tool from the Red Hat Software Collections repository

下载 builder image镜像

docker pull registry.redhat.io/rhel8/nginx-116

利用nginx从gitee的源码创建nginx应用

这个有几个包还是github上的,需要耐心等待下

s2i build https://gitee.com/null_454_5218/nginx-container.git --context-dir=1.16/test/test-app/ registry.redhat.io/rhel8/nginx-116:latest nginx-sample-app


构建新的应用镜像是:nginx-sample-app
在这里插入图片描述

nginx-sample-app   latest  75ac912f2b83   6 minutes ago       411

运行新的应用镜像

docker run -p 8080:8080 nginx-sample-app

验证新的应用

curl -k http://localhost:8080

在这里插入图片描述

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

[shenhonglei]

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值