Closed ainst closed 1 month ago
Actually the Rust toolchain was already installed into /opt/rust
with rustup in the Docker image. The only thing that was missing was running source /opt/rust/env
. I have added an ENV PATH=/opt/rust/bin:$PATH
to the Dockerfile, so sourcing /opt/rust/env
is not needed anymore. Test if this fixes the problem (I think it does, since I run your steps and now it works), and if so we can close this issue.
I updated the Docker image with sudo docker pull ghcr.io/daniestevez/gr4-packet-modem:latest
and also my local repository with git pull
. Although the Dockerfile was updated, the $PATH environment variable did not appear to be updated to include /opt/rust/bin
when I ran the container.
Running source /opt/rust/env
fixes the problem.
I note that the Dockerfile.build has not be updated in the main branch, so I wonder if the container on ghcr.io is updated?
Sorry. I have realized that I forgot to push the ghcr.io/daniestevez/gr4-packet-modem:latest
image that I built yesterday, so I was testing with something that was only available on my machine. I've now pushed it. Can you give it a try?
The Dockerfile.built
file is used to build the gr4-packet-modem-built
image, which gets built and pushed by CI with every commit to main. The dockerfile for gr4-packet-modem
is Dockerfile
. This isn't handled by CI. It needs to be built and pushed manually, because this image is supposed to change only rarely.
The change I did to the Dockerfile
was, by the way, https://github.com/daniestevez/gr4-packet-modem/commit/b8f121bbb4face4a00bc6e143d1484589e517202
Thank you, it all works perfectly as expected now. I can run cmake, compile, and run the created binaries. So please close this issue if you are happy.
My understanding is that the gr4-packet-modem Docker image is intended to allow compilation of GR4 without creating a full local installation. However, if you try to build GR4 using this image CMake almost immediately fails with a rustc not found error:
Steps to reproduce:
docker pull ghcr.io/daniestevez/gr4-packet-modem:latest
git clone https://github.com/daniestevez/gr4-packet-modem.git
docker exec -u0 -it gr4 bash
from the hostcmake ..
Expected result:
CMake completes successfully and creates appropriate Makefiles
Actual result:
Workaround:
Temporarily install rustc in the Docker session, i.e.,
curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh
andsource $HOME/.cargo/env