挂载主机目录

xiaoxiao2025-04-23  14

//挂载主机目录

docker run -d -P  --name web  --mount type=bind,source=/home/www(主机目录),target=/app(image目录)  friendlyhello(image 名称)  

//开终端进入容器内

docker exec -it web(运行中docker容器名称) /bin/bash  

//看日志

docker logs e09373d3c1b4(CONTAINER ID)

转载请注明原文地址: https://www.6miu.com/read-5028967.html

最新回复(0)