Hi.
I built my Docker image for Docker Toolbox (I’m running Windows 10 Home); it was built successfully, but when I tried to run it I got this error:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused “exec: "./currency_converter": permission denied”: unknown.
The command I used to run the image was: “docker run -t -p 8080:80 currency_converter:latest”.
The Dockerfile 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
sudo
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 link=shared install
RUN git clone GitHub - jinja2cpp/Jinja2Cpp: Jinja2 C++ (and for C++) almost full-conformance template engine implementation \
&& cd jinja2cpp
&& git submodule -q update --init \
&& mkdir build \
&& cd build
&& cmake … -DCMAKE_INSTALL_PREFIX=…/install
&& cmake --build . --target all
RUN git clone GitHub - nlohmann/json: JSON for Modern C++
RUN echo -e “\n/usr/local/lib” | sudo tee -a /etc/ld.so.conf
&& sudo ldconfig
RUN g++ -std=c++14 -Wall -pedantic -I ./jinja2cpp/include -I ./jinja2cpp/thirdparty/nonstd/variant-light/include -I ./jinja2cpp/thirdparty/nonstd/expected-light/include -I ./jinja2cpp/thirdparty/nonstd/value-ptr-lite/include -I ./json/single_include -I /usr/local/include/ -I ./jinja2cpp/thirdparty/nonstd/value-ptr-lite/include currency_converter.cpp -L ./jinja2cpp/build -ljinja2cpp -L usr/local/lib/ -lboost_system -lpthread -o currency_converter
EXPOSE 80
ENV apikey
ENV accesskey
RUN chmod -r–r–r-- styles.css scripts.js index.html
&& chmod -r-xr-xr-- currency_converter
CMD [“./currency_converter”, “0.0.0.0”, “8080”, “.”]
How do I fix this? Someone please help.
I want to link against libboost_system.so.1.68.0, which is inside the directory /usr/local/lib. When I tried to run the image earlier without the “echo” command, it gave me an error saying that it can’t find libboost_system.so.1.68.0.
I’m not sure if I can call this a bug. So I don’t really know what type of issue to call it. The OS is Windows 10 Home edition, latest build and version. I’m using Docker Toolbox with VirtualBox virtualization. Docker version 18.03.0-ce, build 0520e24302.