Docker,docker 检查中没有 IP 地址

Docker, no IPAddress in docker inspect

我正在使用以下 dockerfile :

FROM ubuntu:14.04
MAINTAINER xxx xxx<xx@xx.com>


# SSH
RUN apt-get update && apt-get install -y openssh-server
RUN mkdir /var/run/sshd
RUN echo 'root:xxxxxxx' | chpasswd
RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config

# SSH login fix. Otherwise user is kicked off after login
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd

ENV NOTVISIBLE "in users profile"
RUN echo "export VISIBLE=now" >> /etc/profile

EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]



# NodeJS Apache2
RUN apt-get update &&\
        apt-get -y upgrade &&\
        apt-get -y install nodejs nodejs-legacy nodejs-dev npm git curl apache2

我已经关注了:https://docs.docker.com/examples/running_ssh_service/#run-a-test_sshd-container 但是我好像没有IP地址。

我哪里做错了,或者我没有做什么?

看来您需要 运行 boot2docker ip 并使用它