Problems with uploading to raspberry pi using docker

Hi guys! I’m having trouble uploading my build to the reaspberry pi 3 using docker “docker_run.sh”.
Running:
./Tools/docker_run.sh "AUTOPILOT_HOST=192.168.1.76; make emlid_navio2 upload"

Gives the following output:
uessing PX4_DOCKER_REPO based on input
PX4_DOCKER_REPO: px4io/px4-dev-armhf:2021-02-04
Starting with UID : 1000
[0/1] uploading px4
ssh: Could not resolve hostname navio: Temporary failure in name resolution
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3]
FAILED: platforms/posix/CMakeFiles/upload
cd /home/jan/Documents/Projects/PX4-Autopilot/build/emlid_navio2_default/platforms/posix && rsync -arh --progress /home/jan/Documents/Projects/PX4-Autopilot/build/emlid_navio2_default/bin /home/jan/Documents/Projects/PX4-Autopilot/posix-configs/rpi/*.config /home/jan/Documents/Projects/PX4-Autopilot/build/emlid_navio2_default/etc pi@navio:/home/pi/px4
ninja: build stopped: subcommand failed.
make: *** [Makefile:228: emlid_navio2] Error 1

I’m connected to raspberry via ssh with no problems and also when I execute the make command alone everything works fine. But I can’t manage to put the upload command to work.Can anyone help me with that? (edited)

I have found the temporary solution. It looks like the global setting AUTOPILOT_HOST=192.168.1.76 in the file boards/emlid/navio2/cmake/upload.cmake is marekd as not defined and therefore, it is reconfigured by the function below.

if(DEFINED ENV{AUTOPILOT_HOST})
        set(AUTOPILOT_HOST $ENV{AUTOPILOT_HOST})
else()
        set(AUTOPILOT_HOST "navio")
endif()

This made the hostname reset to the default setting “navio” which in my case doesn’t work. I have changed the code in the file to the.

if(DEFINED ENV{AUTOPILOT_HOST})
        set(AUTOPILOT_HOST $ENV{AUTOPILOT_HOST})
else()
        set(AUTOPILOT_HOST "192.168.1.76")
endif()

It is not the most elegant solution but however, it works for now. I still don’t know why global variable is not set :frowning: