Docker,Docker中没有IP地址

Docker,Docker中没有IP地址,docker,boot2docker,Docker,Boot2docker,我正在使用以下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

我正在使用以下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
来自ubuntu:14.04的

维护者xxx xxx
#SSH
运行apt-get-update&&apt-get-install-y openssh服务器
运行mkdir/var/RUN/sshd
运行echo“root:xxxxxxx”| chpasswd
在不使用密码的情况下运行sed-i的/permitrotlogin/permitrotlogin yes/'/etc/ssh/sshd_config
#SSH登录修复程序。否则,用户在登录后将被关闭
运行sed's@session\s*必需\s*pam\u loginuid。so@session可选pam_loginuid。so@g'-i/etc/pam.d/sshd
环境不可见“在用户配置文件中”
运行echo“export VISIBLE=now”>>/etc/profile
暴露22
CMD[“/usr/sbin/sshd”,“-D”]
#NodeJS Apache2
运行apt获取更新&&\
apt-get-y升级&&\
apt get-y安装nodejs nodejs legacy nodejs dev npm git curl apache2
我遵循了: 但我似乎没有IP地址


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

看起来你需要运行
boot2docker-ip
并使用它

我猜你的意思是你没有容器的ip地址,没有boot2docker-VM的ip地址。
docker inspect
的具体输出是什么?