title: Error installing CMake in a docker container. Could not find PROTOBUF
body: <p>Hi I am trying to build a docker image that runs openpose. It goes all well until I have to compile the source I am giving...</p>
  
  <p>I run the Dockerfile below and it throws the following error:</p>
  
  <pre><code>CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
    Could NOT find Protobuf (missing: PROTOBUF_LIBRARY PROTOBUF_INCLUDE_DIR)
  Call Stack (most recent call first):
    /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
    /usr/share/cmake-3.5/Modules/FindProtobuf.cmake:308 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
    CMakeLists.txt:388 (find_package)
  </code></pre>
  
  <p>I tried to do the following: <a href="https://stackoverflow.com/questions/46698260/could-not-find-protobuf-compiler">Could not find PROTOBUF Compiler</a>
  and install the protobuf via apt-get but it didn't work. This happens:</p>
  
  <pre><code>After this operation, 2321 kB of additional disk space will be used.
  Do you want to continue? [Y/n] Abort.
  The command '/bin/sh -c apt-get update &amp;&amp; apt-get install protobuf-compiler' returned a non-zero code: 1
  </code></pre>
  
  <p>this is my Dockerfile:</p>
  
  <pre><code>FROM ubuntu:16.04
  
  RUN apt-get update &amp;&amp; apt-get install -y libopencv-dev
  
  WORKDIR src
  
  RUN apt-get update &amp;&amp; \
      apt-get upgrade -y &amp;&amp; \
      apt-get install -y git
  
  RUN git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose.git
  
  WORKDIR /src/openpose/3rdparty
  
  RUN rm -r caffe
  RUN rm -r pybind11
  
  RUN git clone https://github.com/BVLC/caffe.git
  RUN git clone https://github.com/pybind/pybind11.git
  
  WORKDIR /src/openpose/build
  
  
  RUN apt-get update &amp;&amp; apt-get -y install cmake
  RUN cmake .. -DBUILD_CAFFE=OFF -DGPU_MODE=CPU_ONLY
  RUN make
  RUN make install
  
  RUN make -j`nproc`
  </code></pre>
  
  <p>this trouble happens on the RUN cmake .. line.</p>
  
  <p>The full log of the error is the following:</p>
  
  <pre><code>-- The C compiler identification is GNU 5.4.0
  -- The CXX compiler identification is GNU 5.4.0
  -- Check for working C compiler: /usr/bin/cc
  -- Check for working C compiler: /usr/bin/cc -- works
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Check for working CXX compiler: /usr/bin/c++
  -- Check for working CXX compiler: /usr/bin/c++ -- works
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- GCC detected, adding compile flags
  -- Building CPU Only.
  -- Building with MKL support.
  -- Looking for pthread.h
  -- Looking for pthread.h - found
  -- Looking for pthread_create
  -- Looking for pthread_create - not found
  -- Looking for pthread_create in pthreads
  -- Looking for pthread_create in pthreads - not found
  -- Looking for pthread_create in pthread
  -- Looking for pthread_create in pthread - found
  -- Found Threads: TRUE  
  -- Could NOT find GFlags (missing:  GFLAGS_INCLUDE_DIR GFLAGS_LIBRARY) 
  -- Could NOT find Glog (missing:  GLOG_INCLUDE_DIR GLOG_LIBRARY) 
  CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
    Could NOT find Protobuf (missing: PROTOBUF_LIBRARY PROTOBUF_INCLUDE_DIR)
  Call Stack (most recent call first):
    /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
    /usr/share/cmake-3.5/Modules/FindProtobuf.cmake:308 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
    CMakeLists.txt:388 (find_package)
  
  
  -- Configuring incomplete, errors occurred!
  See also "/src/openpose/build/CMakeFiles/CMakeOutput.log".
  See also "/src/openpose/build/CMakeFiles/CMakeError.log".
  The command '/bin/sh -c cmake .. -DBUILD_CAFFE=OFF -DGPU_MODE=CPU_ONLY -DBLAS=open' returned a non-zero code: 1
  </code></pre>