如何在 docker 中运行一次性命令
如果你只想在 docker 镜像上运行命令而不永久创建容器,运行
docker_run_example.txt
docker run -it --rm [image] [command]例如
docker_run_node.sh
docker run -it --rm node:latest npm --version通过使用 --rm,我们告诉 docker 一旦命令完成就立即删除容器。
Check out similar posts by category:
Allgemein
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow