Docker container can't find cmake executable

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Docker container can't find cmake executable

Osman Zakir
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.

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Docker container can't find cmake executable

Roger Leigh
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
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Docker container can't find cmake executable

Osman Zakir
So I have to do "ENV export PATH=$HOME/usr/bin:$PATH"?  Is that what you mean?

From: CMake <[hidden email]> on behalf of Roger Leigh <[hidden email]>
Sent: Tuesday, October 30, 2018 8:46 PM
To: [hidden email]
Subject: Re: [CMake] Docker container can't find cmake executable
 
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
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Docker container can't find cmake executable

Mateusz Loskot
On Tue, 30 Oct 2018 at 18:10, Osman Zakir <[hidden email]> wrote:
>
> So I have to do "ENV export PATH=$HOME/usr/bin:$PATH"?  Is that what you mean?

Your question is off-topic here. Try Docker forums, StackOverflow, ...

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
--
Mateusz Loskot
http://mateusz.loskot.net