ACINQ / phoenixd

https://phoenix.acinq.co/server
Apache License 2.0
117 stars 15 forks source link

Docker image reports incorrect version #76

Closed sethforprivacy closed 4 months ago

sethforprivacy commented 4 months ago

I've noticed that when building phoenixd via the Dockerfile, the binary mis-reports it's version. For example, here is the version output for v0.3.0 via Docker:

sethforprivacy in 🌐 apps in apps on  master [!?] via  ❯ docker exec -ti phoenixd /phoenix/bin/phoenixd --version                         
phoenixd version 0.1.4-SNAPSHOT-75247e4

It always reports it's version as this specific one, and I've been trying to figure out if it's an issue with the Dockerfile or simply an issue with phoenixd. AFAICT the Docker image is working correctly and building the latest versions, but wanted to raise this just in case.

pm47 commented 4 months ago

That is weird, I can't reproduce:

$ ./phoenix-0.3.1-linux-x64/phoenixd --version
phoenixd version 0.3.1-b735020

$ ./phoenix-0.3.1-jvm/bin/phoenixd --version
phoenixd version 0.3.1-b735020

$ docker run -ti sha256:170b430688291485c5c2046456ac6fa858cd1709cd774aeacde8f201ba0f655a /phoenix/bin/phoenixd --version
phoenixd version 0.3.1-b735020
sethforprivacy commented 4 months ago

It seems like some sort of bug, somehow Github Actions is using the cached layer from the first build I ever did, even though the RUN command is different with every subsequent version.

https://github.com/sethforprivacy/phoenixd-docker/actions/runs/9992104627/job/27616326307#step:10:164

This is definitely on my end, as building locally with --no-cache works properly. Thanks for the quick reply, will sort this out!

sethforprivacy commented 4 months ago

Yup, working perfectly for me now, odd!

sethforprivacy in 🌐 apps in ~ ❯ docker run -it ghcr.io/sethforprivacy/phoenixd:v0.3.1 /phoenix/bin/phoenixd --version
Unable to find image 'ghcr.io/sethforprivacy/phoenixd:v0.3.1' locally
v0.3.1: Pulling from sethforprivacy/phoenixd
Digest: sha256:efae658d4b231cf115966d8008c264df76a72a488c46066db8c1fd7b0d6f61b4
Status: Downloaded newer image for ghcr.io/sethforprivacy/phoenixd:v0.3.1
phoenixd version 0.3.1-b735020
sethforprivacy in 🌐 apps in ~ took 2s ❯ docker run -it ghcr.io/sethforprivacy/phoenixd:latest /phoenix/bin/phoenixd --version
phoenixd version 0.3.1-b735020