1

I am building a web-server on Google managed VMs,which uses dockerfiles to load the settings.In my case,that is to set up the opencv-python.

I have tested it successfully on local sever using "gcloud preview app run ./app.yaml" and everything works perfectly.

but when i deploy it to the google App Engine and SSH into the VM instance,it seems that it did not run the command listed in dockerfiles.

Question 1 : Is there a way that I can see the output(logging) when the instances are building docker image.The logging looks like following on local server

Starting module "default" running at: http://localhost:8080
INFO     2015-03-20 17:43:34,777 containers.py:261] --------------------  DOCKER BUILD  --------------------
INFO     2015-03-20 17:43:34,784 admin_server.py:118] Starting admin server at: http://localhost:8000
INFO     2015-03-20 17:43:34,957 containers.py:280] ---> 92880230fd9f
INFO     2015-03-20 17:43:34,958 containers.py:280] Step 1 : RUN apt-get update && apt-get install -y python-mysqldb
INFO     2015-03-20 17:43:35,076 containers.py:280] ---> Running in b27ba0e6693a

Question 2:any mistakes in my dockfiles

 FROM google/appengine-python27

RUN apt-get update && apt-get install -y python-mysqldb
RUN apt-get update && apt-get install -y build-essential
RUN apt-get update && apt-get install -y cmake git libgtk2.0-dev pkg-          config libavcodec-dev libavformat-dev libswscale-dev
RUN apt-get update && apt-get install -y python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev

RUN cd $HOME;git clone https://github.com/Itseez/opencv.git
RUN cd $HOME;git clone https://github.com/Itseez/opencv_contrib.git

RUN cd $HOME/opencv;mkdir build

RUN cd $HOME/opencv/build;cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local $HOME/opencv
RUN cd $HOME/opencv/build;make -j7
RUN cd $HOME/opencv/build;make install
RUN export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages

ADD . /app
Stephen Kennedy
  • 20,585
  • 22
  • 95
  • 108
T Ye
  • 11
  • 2
  • What commands are you using to deploy? – dlorenc Apr 07 '15 at 22:47
  • Instead of repeating the RUN cd $HOME commands each time, you can use: WORKDIR /path/to/workdir once, followed by the RUN commands for everything that is to execute in that path. – Jeff Deskins Jul 21 '15 at 19:45

0 Answers0