如何使用Windows上的Boot2Dockerbuild立一个imagem?

我有我的本地开发文件在G:\www\project和我的Dockerfile被放置在G:\www\project\Dockerfile

目前没有办法可以做docker build -t app . ,我的Dockerfile是这样的:

 FROM ubuntu:14.10 RUN apt-get update && apt-get upgrade -y --force-yes && apt-get -y install software-properties-common --force-yes RUN locale-gen pt_BR.UTF-8 ENV LANG pt_BR.UTF-8 ENV LC_ALL pt_BR.UTF-8 ENV DEBIAN_FRONTEND noninteractive RUN add-apt-repository -y ppa:nginx/stable RUN add-apt-repository -y ppa:ondrej/php5 RUN apt-get -y install nginx php5-fpm php5-mysql php-apc php5-mcrypt php5-gd RUN echo "cgi.fix_pathinfo = 0;" >> /etc/php5/fpm/php.ini ADD https://raw.github.com/h5bp/server-configs-nginx/master/h5bp/location/expires.conf /etc/nginx/conf/expires.conf ADD https://raw.github.com/h5bp/server-configs-nginx/master/h5bp/directive-only/x-ua-compatible.conf /etc/nginx/conf/x-ua-compatible.conf ADD https://raw.github.com/h5bp/server-configs-nginx/master/h5bp/location/cross-domain-fonts.conf /etc/nginx/conf/cross-domain-fonts.conf ADD https://raw.github.com/h5bp/server-configs-nginx/master/h5bp/location/protect-system-files.conf /etc/nginx/conf/protect-system-files.conf RUN mkdir /srv/www ADD ./docker/default /etc/nginx/sites-available/default ADD ./docker/nginx.conf /etc/nginx/nginx.conf RUN sed -i -e '/access_log/d' /etc/nginx/conf/expires.conf RUN sed -i -e 's/^listen =.*/listen = \/var\/run\/php5-fpm.sock/' /etc/php5/fpm/pool.d/www.conf ADD ./docker/start.sh /start.sh ADD ./application /srv/www/application ADD ./bower_components /srv/www/bower_components ADD ./content /srv/www/content ADD ./javascripts /srv/www/javascripts ADD ./modules /srv/www/modules ADD ./stylsheets /srv/www/stylesheets ADD ./system /srv/www/system ADD ./index.php /srv/www/index.php EXPOSE 80 443 RUN chmod +x /start.sh ENTRYPOINT ["/start.sh"] 

我已经看到OSX的解决方法,但没有为Windows。 试图将VirtualBox Guest Additions安装到tinycorelinux,但它不会将映像挂载到sr0

是的,目前没有支持Windows的Docker客户端(虽然它的方式)

和iirc,Boot2Docker 1.3是硬编码假设你的用户目录是在C: ::/

所以最好的解决scheme是快速到达那里,将文件scp到vm,然后在那里运行构build。

(从G:\Users\project

$ scp * docker@$(boot2docker ip):~/ $ boot2docker ssh $$ docker build -t app . $$ docker run --rm -it app bash