https://c.163.com/hub#/m/repo...它在最后啟動了那個sshd服務但是在本機我用什么密碼鏈接進去呢?FROMhub.c.163.com/public/centos:7.2.1511RUNyumcleanallRUNyuminstall-yyum-plugin-ovl||trueRUNyuminstall-yvimtarwgetcurlrsyncbzip2iptablestcpdumplesstelnetnet-toolslsofsysstatcroniepython-setuptoolsRUNyumcleanallRUNeasy_installsupervisorRUNcp-f/usr/share/zoneinfo/Asia/Shanghai/etc/localtimeEXPOSE22RUNmkdir-p/etc/supervisor/conf.d/RUN/usr/bin/echo_supervisord_conf>/etc/supervisord.confRUNecho[include]>>/etc/supervisord.confRUNecho'files=/etc/supervisor/conf.d/*.conf'>>/etc/supervisord.confCOPYsshd.conf/etc/supervisor/conf.d/sshd.confCMD["/usr/bin/supervisord"]下面是前面centos:7.2.1511的dockerfile文件FROMscratchMAINTAINERneteaseADDcentos-7-docker.tar.xz/LABELname="CentOSBaseImage"\vendor="CentOS"\license="GPLv2"\build-date="20160701"ADDCentOS-Base.repo/etc/yum.repos.d/CentOS-Base.repo#安裝常用軟件RUNyuminstall-yopenssh-server#初始化ssh登陸RUNssh-keygen-trsa-f/etc/ssh/ssh_host_rsa_key-N''RUNssh-keygen-tdsa-f/etc/ssh/ssh_host_dsa_key-N''RUNssh-keygen-tecdsa-f/etc/ssh/ssh_host_ecdsa_key-N''RUNssh-keygen-ted25519-f/etc/ssh/ssh_host_ed25519_key-N''RUNecho"RSAAuthenticationyes">>/etc/ssh/sshd_configRUNecho"PubkeyAuthenticationyes">>/etc/ssh/sshd_configRUNyumcleanall#啟動sshd服務并且暴露22端口RUNmkdir/var/run/sshdEXPOSE22CMD["/usr/sbin/sshd","-D"]
怎么理解這個Dockerfile
LEATH
2019-05-25 14:57:35
