Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker run gives error #20

Closed
kushnertodd opened this issue Jul 26, 2023 · 4 comments
Closed

Docker run gives error #20

kushnertodd opened this issue Jul 26, 2023 · 4 comments

Comments

@kushnertodd
Copy link

oatpp-starter builds and runs from the commandline in Ubuntu, but docker build fails. Latest commit:

commit 2eab7b4 (HEAD -> master, origin/master, origin/HEAD)
Author: Leonid Stryzhevskyi lganzzzo@gmail.com
Date: Fri Dec 17 02:58:18 2021 +0200

output:

$ oatpp-starter (master)]$ docker run -p 8000:8000 -t oatpp-starter

=> ERROR [6/7] RUN cmake ..

[6/7] RUN cmake ..:
0.506 -- The C compiler identification is GNU 6.4.0
0.552 -- The CXX compiler identification is GNU 6.4.0
0.559 -- Check for working C compiler: /usr/bin/cc
0.623 -- Check for working C compiler: /usr/bin/cc -- works
0.624 -- Detecting C compiler ABI info
0.680 -- Detecting C compiler ABI info - done
0.690 -- Detecting C compile features
0.859 -- Detecting C compile features - done
0.864 -- Check for working CXX compiler: /usr/bin/c++
0.948 -- Check for working CXX compiler: /usr/bin/c++ -- works
0.949 -- Detecting CXX compiler ABI info
1.041 -- Detecting CXX compiler ABI info - done
1.052 -- Detecting CXX compile features
1.354 -- Detecting CXX compile features - done
1.356 CMake Error at CMakeLists.txt:18 (find_package):
1.356 By not providing "Findoatpp.cmake" in CMAKE_MODULE_PATH this project has
1.356 asked CMake to find a package configuration file provided by "oatpp", but
1.356 CMake did not find one.
1.356
1.356 Could not find a package configuration file provided by "oatpp" (requested
1.356 version 1.3.0) with any of the following names:
1.356
1.356 oatppConfig.cmake
1.356 oatpp-config.cmake
1.356
1.356 Add the installation prefix of "oatpp" to CMAKE_PREFIX_PATH or set
1.356 "oatpp_DIR" to a directory containing one of the above files. If "oatpp"
1.356 provides a separate development package or SDK, be sure it has been
1.356 installed.
1.356
1.356
1.357 -- Configuring incomplete, errors occurred!
1.357 See also "/service/build/CMakeFiles/CMakeOutput.log".

Dockerfile:11

9 | WORKDIR /service/build
10 |
11 | >>> RUN cmake ..
12 | RUN make
13 |

ERROR: failed to solve: process "/bin/sh -c cmake .." did not complete successfully: exit code: 1

@kushnertodd
Copy link
Author

kushnertodd commented Jul 27, 2023

The cmake and Ubuntu versions used are:

$ cmake --version
cmake version 3.27.0-rc4

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy

Builds and runs fine outside docker.

@tommykoning
Copy link

tommykoning commented Aug 22, 2023

the cmake image they use is outdated which which causes the install-oatpp-modules.sh to break partly through
you can fix it by going into the .dockerfile and replacing

FROM lganzzzo/alpine-cmake:latest

with

FROM gcc:latest

RUN set -ex;                                                                      \
    apt-get update;                                                               \
    apt-get install -y cmake libzmq3-dev;

you also might need to prune the build catches

@kushnertodd
Copy link
Author

Perfect.

@kushnertodd
Copy link
Author

Works as intended. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants