我已经将docker容器作为带有node和perl文件列表的图像提交。
rm/node 4.0 22d40a764333 2 days ago 1.376 GB
以下是rm / node:4.0 image
中的内容[dkanagaraj@localhost docker_test]$ docker run -it rm/node:4.0
Usage of loopback devices is strongly discouraged for production use. Either use `--storage-opt dm.thinpooldev` or use `--storage-opt dm.no_warn_on_loop_devices=true` to suppress this warning.
[root@2d6c97a0a416 /]# ls -lrt Reader_Manager/SISPlatform/
total 20
drwxr-xr-x. 2 root root 61 Jun 2 20:49 Dev-SSL
drwxr-xr-x. 2 root root 40 Jun 2 20:49 sis-auth
drwxr-xr-x. 9 root root 86 Jun 2 20:49 logs
drwxr-xr-x. 2 root root 89 Jun 2 20:49 build_scripts
-rw-r--r--. 1 root root 83 Jun 2 20:49 StopAllServices.bat
-rw-r--r--. 1 root root 174 Jun 2 20:49 StartAllServices.bat
drwxr-xr-x. 4 root root 104 Jun 2 20:49 SISMA
drwxr-xr-x. 4 root root 104 Jun 2 20:49 SISCS
drwxr-xr-x. 5 root root 4096 Jun 2 21:27 Auth
drwxr-xr-x. 10 root root 4096 Jun 2 21:28 SISRM
drwxr-xr-x. 5 root root 4096 Jun 2 21:29 SEOS-TSMWrapper
使用下面的dockerfile创建新映像rm / node:5.0。
[dkanagaraj@localhost docker_test]$ cat Dockerfile
FROM rm/node:4.0
EXPOSE 3000
EXPOSE 3030
EXPOSE 7030
WORKDIR /root/Reader_Manager/SISPlatform
但无法运行脚本,因为它没有说这样的文件或目录。
[dkanagaraj@localhost docker_test]$ docker run rm/node:5.0 perl build_scripts/devdeploy.pl
Usage of loopback devices is strongly discouraged for production use. Either use `--storage-opt dm.thinpooldev` or use `--storage-opt dm.no_warn_on_loop_devices=true` to suppress this warning.
Can't open perl script "build_scripts/devdeploy.pl": No such file or directory
所以我检查了rm / node:5.0图像。默认情况下,它进入了dockerfile中提到的workdir。但它不包含来自rm / node的任何文件:4.0
[dkanagaraj@localhost docker_test]$ docker run -it rm/node:5.0
Usage of loopback devices is strongly discouraged for production use. Either use `--storage-opt dm.thinpooldev` or use `--storage-opt dm.no_warn_on_loop_devices=true` to suppress this warning.
[root@b546a939be6e SISPlatform]# ls
[root@b546a939be6e SISPlatform]#