[英]docker run mysql images but it terminate automaticly
I'm just using docker for first time and I copy it on the inte.net This is my file我只是第一次使用 docker 并将其复制到 inte.net 这是我的文件
Dockerfile Dockerfile
FROM mysql:oracle
COPY dbscript.sql /docker-entrypoint-initdb.d/
and I build it with this command我用这个命令构建它
docker build -t mysqllab
after built I run it建成后我运行它
docker run -d --name mysqllabtest -e MYSQL_ROOT_PASSWORD='abc123' mysqllab
it's run and get the message of container id, so I run它运行并获取容器 ID 的消息,所以我运行
docker ps
to see what my container is running but it's don't have this container, I try it again with fast docker ps so I see it run for 4 seconds and terminate What Can I do with this?要查看我的容器正在运行但它没有此容器,我再次尝试使用快速 docker ps 所以我看到它运行了 4 秒并终止我可以用这个做什么?
I just use我只是用
docker logs mysqllabtest
for check something wrong it about MySQL script so after I edited it It's works!用于检查有关 MySQL 脚本的错误,所以在我编辑它之后它就可以工作了! thanks @Hans Kilian for tell me this command
感谢@Hans Kilian 告诉我这个命令
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.