Docker的imageID和containerID的区别以及输出Docker内部的环境变量。
# docker imagesREPOSITORYTAGIMAGE IDCREATEDSIZEsaleor-dashboardlatestf495c0820c595 hours a...
# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
saleor-dashboard latest f495c0820c59 5 hours ago 137MB
<none> <none> a82db88684b4 8 hours ago 913MB
nginx stable 8c5ec390a315 2 weeks ago 127MB
node 10 aa6432763c11 2 weeks ago 911MB
那么如何进入这个docker呢:
# docker run -it f495c0820c5 /bin/bash
root@046ea255739a:/app# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
注意,进入docker后会默认进去/app,其实可以进入/
cd /即可
046ea255739a就是container ID
更多推荐
所有评论(0)