VROOM-Project / vroom-docker

Docker image for vroom and vroom-express
BSD 2-Clause "Simplified" License
88 stars 58 forks source link

Cannot build image #70

Closed ilibar-zpt closed 1 year ago

ilibar-zpt commented 1 year ago

Trying to build the image on fresh master and using command docker build -t vroomvrp/vroom-docker:v1.13.0 --build-arg VROOM_RELEASE=v1.13.0 --build-arg VROOM_EXPRESS_RELEASE=v0.11.0 . from README yields

15.48 g++ -MMD -MP -I. -std=c++17 -Wextra -Wpedantic -Wall -O3 -DASIO_STANDALONE -DUSE_ROUTING=true -DNDEBUG -D USE_LIBGLPK=true -c problems/tsp/heuristics/local_search.cpp -o problems/tsp/heuristics/local_search.o
54.40 make: *** [makefile:76: main.o] Error 1
54.40 make: *** Waiting for unfinished jobs....
58.29 make: Leaving directory '/vroom/src'
------
Dockerfile:18
--------------------
  17 |     
  18 | >>> RUN echo "Cloning and installing vroom release ${VROOM_RELEASE}..." && \
  19 | >>>     git clone  --recurse-submodules https://github.com/VROOM-Project/vroom.git && \
  20 | >>>     cd vroom && \
  21 | >>>     git fetch --tags && \
  22 | >>>     git checkout -q $VROOM_RELEASE && \
  23 | >>>     make -C /vroom/src -j$(nproc) && \
  24 | >>>     cd /
  25 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c echo \"Cloning and installing vroom release ${VROOM_RELEASE}...\" &&     git clone  --recurse-submodules https://github.com/VROOM-Project/vroom.git &&     cd vroom &&     git fetch --tags &&     git checkout -q $VROOM_RELEASE &&     make -C /vroom/src -j$(nproc) &&     cd /" did not complete successfully: exit code: 2
$ docker --version
Docker version 24.0.7, build afdd53b4e3
$ uname -srv
Linux 6.5.9-arch2-1 #1 SMP PREEMPT_DYNAMIC Thu, 26 Oct 2023 00:52:20 +0000
nilsnolde commented 1 year ago

Can't see how that can fail.. what's the command to build the image? Which line is failing exactly? You can go inside a Debian container and debug this.

ilibar-zpt commented 1 year ago

Full output (should have provided it earlier)

nilsnolde commented 1 year ago

Sorry, I meant which line in this multi-line statement:

  18 | >>> RUN echo "Cloning and installing vroom release ${VROOM_RELEASE}..." && \
  19 | >>>     git clone  --recurse-submodules https://github.com/VROOM-Project/vroom.git && \
  20 | >>>     cd vroom && \
  21 | >>>     git fetch --tags && \
  22 | >>>     git checkout -q $VROOM_RELEASE && \
  23 | >>>     make -C /vroom/src -j$(nproc) && \
  24 | >>>     cd /

For that, you can just go inside the fresh debian container and execute line by line of the dockerfile.

I'll get to this the latest once a new version of VROOM will be released. Of course a PR would be appreciated too.

ilibar-zpt commented 1 year ago

the error is from make:

54.40 make: *** [makefile:76: main.o] Error 1

And there's only one make command in the chain of && there

nilsnolde commented 1 year ago

Oh sorry you're right, didn't look properly.. cxxopts had a breaking change, which is what breaks your compilation and https://github.com/VROOM-Project/vroom-docker/pull/69 should've fixed that. You sure you pulled lately? Obviously CI agreed on that PR: https://github.com/VROOM-Project/vroom-docker/actions/runs/6536891173/job/17749571634.

Seeing that I publish a latest image via Github Actions to Dockerhub, I very much wonder where the latest image ends up.. for sure not here: https://hub.docker.com/r/vroomvrp/vroom-docker/tags.

@jcoupey is there some dockerhub setting to expose latest? I know we decided to not build one, but I'd actually prefer to have one, so I don't have to go through any release flow when non-vroom things are updated. I always make sure my docker repos are stable on master, mostly so I can comfortably publish latest and people don't bug me about releases;)

nilsnolde commented 1 year ago

I quickly tried it and it works fine for me with docker build --pull -t vroomvrp/docker-vroom . on master. Also I can see that you're not running latest master, this is using the old command before #69 to clone the branch:

  18 | >>> RUN echo "Cloning and installing vroom release ${VROOM_RELEASE}..." && \
  19 | >>>     git clone  --recurse-submodules https://github.com/VROOM-Project/vroom.git && \
  20 | >>>     cd vroom && \
  21 | >>>     git fetch --tags && \
  22 | >>>     git checkout -q $VROOM_RELEASE && \
  23 | >>>     make -C /vroom/src -j$(nproc) && \
  24 | >>>     cd /
ilibar-zpt commented 1 year ago

Thanks, works well now, should have checked for updates