记录docker安装eclipse-che

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

文章目录

  • 一、eclipse-che的容器名称变化
  • 二、部署步骤
    • 1.docker源的设定
    • 2.启动命令
    • 2.异常处理
      • 1、conn (server => ws): [NOT OK]
      • 2、We could not resolve DockerHub using DNS.
      • 3、ERROR: Error during 'compose up' - printing 30 line tail of /root/EclipseChe/cli.log:
  • 总结


一、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 checksmem (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年的 应该是用的不怎么多了。。


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部