记录docker安装eclipse-che

领导安排在虚拟机内安装下eclipse-che,记录下安装的过程


一、eclipse-che的容器名称变化

eclipse che容器名称在发展过程中存在着变化,参考各种文章记录之后,进行逐一实验,发现eclipse/che:6.19.0是可以运行的一个版本,已经有更新的7版本了,但是基于稳定性考虑,用了上一版本的最新小版本。
有的文章写的时间比较早,当时是pull codenvy/che 的镜像,现在可以使用的是eclipse/che的镜像

二、部署步骤

1.docker源的设定

/etc/docker/daemon.json

{ 
	"registry-mirrors": ["http://registry.docker-cn.com"] 
}

修改完加载配置重启docker服务后生效

systemctl daemon-reload
systemctl restart docker.service

2.启动命令

启动命令如下:

docker run -ti --rm --name $name -v /var/run/docker.sock:/var/run/docker.sock -v /root/EclipseChe:/data -e CHE_PORT=18080 -e CHE_HOST=$IP eclipse/che:6.19.0 start
  • -v /var/…是选择docker文件
  • -v /opt/…是选择容器存放位置
  • -e CHE_HOST 设置主机的IP地址
  • -e CHE_PORT 设置访问端口号

2.异常处理

1、conn (server => ws): [NOT OK]

INFO: (che cli): 6.19.0 - using docker 20.10.7 / native
WARN: Newer version 'rc' available
INFO: (che config): Generating che configuration...
INFO: (che config): Customizing docker-compose for running in a container
INFO: (che start): Preflight checks
         mem (1.5 GiB):           [OK]
         disk (100 MB):           [OK]
         port 18080 (http):        [AVAILABLE]
         conn (browser => ws):    [NOT OK]
         conn (server => ws):     [NOT OK]

是防火墙的原因,关掉防火墙即可。

systemctl status firewalld
systemctl stop firewalld

参考的是
https://blog.csdn.net/z_beast/article/details/103309512

2、We could not resolve DockerHub using DNS.

WARNING: IPv4 forwarding is disabled. Networking will not work.
WARNING: IPv4 forwarding is disabled
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
INFO: Welcome to Eclipse Che!
INFO: 
INFO: We could not resolve DockerHub using DNS.
INFO: Either we cannot reach the Internet or Docker's DNS resolver needs a modification.
INFO: 
INFO: You can:
INFO:   1. Modify Docker's DNS settings.
INFO:      a. Docker for Windows & Mac have GUIs for this.
INFO:      b. Typically setting DNS to 8.8.8.8 fixes resolver issues.
INFO:   2. Does your network require Docker to use a proxy?
INFO:      a. Docker for Windows & Mac have GUIs to set proxies.
INFO:   3. Verify that you have access to DockerHub.
INFO:      a. Try 'curl --head hub.docker.com'
INFO:   4. Skip networking checks.
INFO:      a. Add '--fast' to any command

直接加上 --fast参数就行

3、ERROR: Error during ‘compose up’ - printing 30 line tail of /root/EclipseChe/cli.log:

ERROR: for che  Cannot start service che: driver failed programming external connectivity on endpoint che-18080 (b89e7a9eac37e4097b5a67f29c7165ddb30a13bf0854b5aa969c1a0eff929a80):  (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 18080 -j DNAT --to-destination 172.17.0.4:18080 ! -i docker0: iptables: No chain/target/match by that name.
 (exit status 1))
Encountered errors while bringing up the project.
ERROR: Error during 'compose up' - printing 30 line tail of /root/EclipseChe/cli.log:

重启下docker服务即可解决

参考的是
http://jettylee.com/?p=695


总结

最新的容器更新都是2年前 大约19年的 应该是用的不怎么多了。。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值