[root@Centos lyd]# cd /home/ocean
bash: cd: /home/ocean: 没有那个文件或目录
[root@Centos lyd]# cd home
bash: cd: home: 没有那个文件或目录
[root@Centos lyd]# cd /home
[root@Centos home]# cd /ocean
bash: cd: /ocean: 没有那个文件或目录
[root@Centos home]# cd ocean
bash: cd: ocean: 没有那个文件或目录
[root@Centos home]# cd /ocean
bash: cd: /ocean: 没有那个文件或目录
[root@Centos home]# sh docker.sh
sh: docker.sh: 没有那个文件或目录
[root@Centos home]# cd ..
[root@Centos /]# cd /ocean
bash: cd: /ocean: 没有那个文件或目录
[root@Centos /]# ls
bin dev home lib64 mnt proc run srv tmp var
boot etc lib media opt root sbin sys usr
[root@Centos /]# cd /home
[root@Centos home]# ls
lyd
[root@Centos home]# ls
lyd
[root@Centos home]# cd /lyd
bash: cd: /lyd: 没有那个文件或目录
[root@Centos home]# cd lyd
[root@Centos lyd]# ls
ocean 公共 模板 视频 图片 文档 下载 音乐 桌面
[root@Centos lyd]#
报错
[root@Centos ocean]# sh docker.sh
已加载插件:fastestmirror, langpacks
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"
One of the configured repositories failed (未知),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
网络问题
根据教程 "Could not resolve host: mirrorlist.centos.org; Unknown error"解决方法 - Mr.Gavin - 博客园配置网络
将docker.sh文件保存到虚拟机上
进入文件所在目录
执行代码
sh docker.sh
[root@Centos ocean]# mv start-0.0.1-20220401.092159-3.jar /home/ocean-visualizaion-parent/target/
报错
[root@Centos ocean-visualization-parent]# docker run -d -p 8080:8080 ocean-visualization:v1.0 --bind 0.0.0.0
a77516f2d1ab7f9a7b89e3f4b55246d3b61d894020db657602415ae0111e9bb2
docker: Error response from daemon: driver failed programming external connectivity on endpoint quirky_bardeen (452b50511e903b73796e4c2ac5d015905b83a5fad5f2a677b73825f34d8de2c1): Bind for 0.0.0.0:8080 failed: port is already allocated.
解决方法
[root@Centos ocean-visualization-parent]# systemctl restart docker
执行该命令时遇到问题
参考关于Docker容器启动安装的各种的问题总结与解决。_你走吧起风了__的博客-CSDN博客_docker安装白屏
[root@Centos ocean]# mv start-0.0.1-20220401.092159-3.jar /home/ocean-visualizaion-parent/target/