[CMake] Docker container can't find cmake executable

Roger Leigh rleigh at codelibre.net
Tue Oct 30 11:46:14 EDT 2018


On 30/10/2018 15:41, Osman Zakir wrote:
> I put this command in the Dockerfile:
> "
> RUN mkdir $HOME/usr \
>      && wget -O cmake-linux.sh 
> https://cmake.org/files/v3.12/cmake-3.12.3-Linux-x86_64.sh \​
>      && sh cmake-linux.sh -- --skip-license --prefix=$HOME/usr \​
>      && cd $HOME/usr \​
>      && ls \​
>      && export PATH=$HOME/usr/bin:$PATH
> "
> But when it gets to running CMake, it can't find the executable.  Please 
> help.

This is a docker question, nothing to do with cmake.  You need to use 
the ENV directive, not RUN.  The export you have here has no effect 
after the command finishes.


Roger


More information about the CMake mailing list