Add building and container recipes#20
Add building and container recipes#20D4rkDuck wants to merge 2 commits intoSimulation-Software-Engineering:mainfrom
Conversation
….cpp and add CMakeList.txt
MakisH
left a comment
There was a problem hiding this comment.
Everything looks mostly good here and works, thanks! Just some minor comments, which are not affecting functionality in this case, but would be something to note for next projects.
| RUN apt install -y libboost-all-dev | ||
| Run apt install -y libdeal.ii-dev |
There was a problem hiding this comment.
While uppercase/lowercase does not matter, I would stick to one (typically uppercase in Dockerfiles). Similarly for CMake (lowercase).
| Run wget https://github.com/jbeder/yaml-cpp/archive/refs/tags/yaml-cpp-0.6.3.zip | ||
| Run unzip yaml-cpp-0.6.3.zip | ||
| RUN cd yaml-cpp-yaml-cpp-0.6.3 && mkdir build && cd build && cmake .. && make && make install | ||
| ENV LD_LIBRARY_PATH = /usr/local/bin |
There was a problem hiding this comment.
This leads to the = being part of the value:
root@22cc76132608:/mnt/host# echo $LD_LIBRARY_PATH
= /usr/local/bin
Use either ENV var=value or the legacy ENV var value.
By the way, the value should be /usr/local/lib, since it is a library.
| @@ -0,0 +1,15 @@ | |||
| cmake_minimum_required(VERSION "3.12") | |||
|
|
|||
| project("main") | |||
There was a problem hiding this comment.
FYI, this can also be different from the name of the executable (and is typically something more descriptive).
| RUN cd yaml-cpp-yaml-cpp-0.6.3 && mkdir build && cd build && cmake .. && make && make install | ||
| ENV LD_LIBRARY_PATH = /usr/local/bin | ||
|
|
||
| WORKDIR mnt/host |
There was a problem hiding this comment.
The WORKDIR paths should be absolute, but this worked.
Gitlab Username: luxik
Instructions to run the project can be found in the readme, but I will include it here aswell:
Instructions
The imageName has to be chosen! ("cmakeFight" could be a fitting name)
cd cmake-exerciseExpected output: