[英]How to run Eclipse with Docker on Windows using Boot2Docker?
[英]How to build an imagem using Boot2Docker on Windows?
我將本地開發文件放在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進行了硬編碼,以假定您的Users目錄位於C:
:: /
因此,最好的解決方案是將文件壓縮到vm,然后在其中運行構建。
(來自G:\\Users\\project
)
$ scp * docker@$(boot2docker ip):~/ $ boot2docker ssh $$ docker build -t app . $$ docker run --rm -it app bash
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.