docker export 出tomcat容器后,再导入另一台机器上import后启动报错,求指点

[root@localhost ~]# docker export -o tomcat_c.tar 5f41ebf44610
[root@localhost ~]# ll
total 1546728
-rw———-. 1 root root 1868 Jan 27 21:57 anaconda-ks.cfg
-rw-r—r—. 1 root root 1899 Jan 27 22:00 initial-setup-ks.cfg
drwxr-xr-x 3 root root 35 Feb 4 01:45 linkis
-rw———- 1 root root 135403008 Feb 7 03:47 mysql.tar
-rw———- 1 root root 135403008 Feb 7 03:14 nginx.tar
-rw———- 1 root root 652226560 Feb 7 04:42 tomcat_c.tar
-rw———- 1 root root 660800512 Feb 7 01:45 tomcat.tar.bak

//以上是其中一台机器221导出tomcat容器

[root@mariadb ~]$ docker import ./tomcat_c.tar tomcat:0.1
sha256:eb28a9ee141c5d2aa35ece000a012021da37d3754db3de8178bc2a0b4e4afe41
[root@mariadb ~]$ ll

//在222机器上导入此tar包

[root@mariadb ~]$ docker run -d —name tomcat_01 -P tomcat:0.1
docker: Error response from daemon: No command specified.
See ‘docker run —help’.
[root@mariadb ~]$
[root@mariadb ~]$ docker run -d —name tomcat_01 -P tomcat:0.1 -g ‘daemon off;’
559fe65830d86264c648f7d8e17d32432f38e2a30f17980d564d4108735cefac
docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: “-g”: executable file not found in $PATH: unknown.
[root@mariadb ~]$

[root@mariadb ~]$ docker run -d —name tomcat_01 -P tomcat:0.1 “catalina.sh run”
b7ca1015a3f43f3b433c612b71490b875e595aec867cdeb59d45f898ea69d008
docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: “catalina.sh run”: executable file not found in $PATH: unknown.
[root@mariadb ~]$ docker ps

在222机器上运行多次要么报错,要么运行后不报错只能在docker ps -a 历史中找到,请知道的大神指点下小老弟,谢谢!

posted on 2021-02-08 09:44  钱动力  阅读(183)  评论(0)    收藏  举报