The previous approach using dune subst was not producing binaries with version information.
$ docker pull ocurrent/solver-service:live
$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
ocurrent/solver-service live eba01b2690c8 14 hours ago 567MB
$ docker run -it --entrypoint /bin/bash eba01b2690c8
root@07bfc220368b:/var/lib/ocluster-worker# /usr/local/bin/solver-worker --version
n/a
I suspect the copying hack we have for depending on solver-service might be responsible. But I've not debugged into the dune source code for what is going on exactly.
Using dune install reliably produces a binary with version information.
$ docker build -t solver-service -f Dockerfile .
$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
solver-service latest 0fb0e2680187 13 minutes ago 567MB
$ docker run -it --entrypoint /bin/bash 0fb0e2680187
root@b14fe72206fb:/var/lib/ocluster-worker# /usr/local/bin/solver-worker --version
83cf768-dirty
The previous approach using
dune subst
was not producing binaries with version information.I suspect the copying hack we have for depending on solver-service might be responsible. But I've not debugged into the dune source code for what is going on exactly.
Using dune install reliably produces a binary with version information.
Based off the discussion here https://github.com/ocurrent/ocluster/pull/178 and @MisterDA 's suggestion