第一篇参考:
https://blog.csdn.net/weixin_42357472/article/details/131953866
运行容器同时执行命令或脚本
1)这是打开一个对外的jupyter notebook容器环境
docker run -d --name my_container -p 8090:8888 mynewpythonimage jupyter notebook --allow-root --ip 0.0.0.0
在外部打开localhost:8090 jupter需要登录密码
docker exec -it my_container bashjupyter notebook list ##可以查看到token密码
2)运行脚本
docker run -d --name my_container -p 8090:8888 mynewpythonimage python test.py