如何判断我的Docker图像是否符合我的要求?
我有以下Dockerfile:如何判断我的Docker图像是否符合我的要求?,docker,Docker,我有以下Dockerfile: FROM rocker/r-base COPY ./hello.R /tmp/hello.R CMD R CMD BATCH /tmp/hello.R hello.R如下所示: print("hello world") docker run my-images/testing 我可以很好地构建图像,但当我这样运行它时: print("hello world") docker run my-images/testing 我看不到输出。docker映像向
FROM rocker/r-base
COPY ./hello.R /tmp/hello.R
CMD R CMD BATCH /tmp/hello.R
hello.R
如下所示:
print("hello world")
docker run my-images/testing
我可以很好地构建图像,但当我这样运行它时:
print("hello world")
docker run my-images/testing
我看不到输出。docker映像向上旋转、运行,然后终止
如何知道脚本是否正在运行?我如何测试它是否按预期工作?您可能只需要设置
--interactive
标志:
docker run -i my-images/testing