-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Dockerfile Project Help Needed #1296
Comments
As you passed |
As noted in jinja2cpp/Jinja2Cpp#70, looking at your Dockerfile and its build script would help to diagnose the problem. |
Okay, I took out the flag to bring in
And the Dockerfile itself is: FROM ubuntu:18.04
WORKDIR /app
COPY /scripts /styles index.html currency_converter.cpp /app/
RUN apt-get update \
&& apt-get install -y git \
g++ \
build-essential \
make \
wget \
cmake
RUN wget https://dl.bintray.com/boostorg/release/1.68.0/source/boost_1_68_0.tar.bz2 \
&& tar -xjf boost_1_68_0.tar.bz2 \
&& rm -rf boost_1_68_0.tar.bz2 \
&& cd boost_1_68_0 \
&& ./bootstrap.sh \
&& ./b2 install
RUN git clone https://github.com/flexferrum/jinja2cpp \
&& cd jinja2cpp \
&& git submodule -q update --init \
&& mkdir build \
&& cd build \
&& cmake .. -DCMAKE_INSTALL_PREFIX=../install \
&& cmake --build . --target all
RUN git clone https://github.com/nlohmann/json
RUN g++ -std=c++14 -Wall -pedantic -I app/jinja2cpp/install/include -I app/json/single_include -I /usr/local/include/ -I app/jinja2cpp/thirdparty/nonstd/value-ptr-lite/include currency_converter.cpp -L app/jinja2cpp/install/lib/static -ljinja2cpp -L usr/local/lib -lboost_system -lpthread -o currency_converter
EXPOSE 80
ENV apikey <APIKEY>
ENV accesskey <ACCESSKEY>
CMD ["./currency_converter", "0.0.0.0", "8080", "."] |
What is the content of app/json/single_include? |
Let me check and get back to you (I'll update this comment). Edit: Yes, the Edit2: As I thought, it's in there. So what do I do about this? It's saying the file isn't there, but it is. Will it work if I do it like this: |
Your compiler cannot find the JSON header. This has nothing to do with this library or Docker, but is a standard C++ problem. Can you try to compile a smaller program that only includes |
I need some help on a Dockerfile project based on the app I made. I got an error saying that there's no such file or directory as
nlohmann/json.hpp
. I got similar errors for Jinja2Cpp, but I'll ask that on their GitHub rather than here (though if someone here can help me with that, then that's even better for me).The command I'm using in the Dockerfile to compile my executable is:
The error from g++ during the Dockerfile build process is:
This is my code (I posted it on GitHub as well): https://github.com/DragonOsman/currency_converter/blob/master/currency_converter.cpp .
Any help is appreciated. Thanks.
The text was updated successfully, but these errors were encountered: