kamal icon indicating copy to clipboard operation
kamal copied to clipboard

bug: Updating remote builder host in config.yaml doesn't update endpoint in Docker context

Open kjellberg opened this issue 2 years ago • 4 comments

I had to run docker context remove <context> first, before running mrsk deploy again. But I feel that when updating config values for the remote, the docker context should update as well?

before

app: foo
builder:
  remote:
    arch: amd64
    host: ssh://root@***
$ docker context ls
NAME                                  DESCRIPTION                                       DOCKER ENDPOINT                                ERROR
default *                             Current DOCKER_HOST based configuration           unix:///var/run/docker.sock                    
desktop-linux                                                                           unix:///Users/rasmus/.docker/run/docker.sock   
mrsk-app-native-remote-amd64   mrsk-app-native-remote amd64 native host   ssh://root@***

after

builder:
  remote:
    arch: amd64
    host: ssh://changed-user-to-something-else-than-root@***
$ docker context ls
NAME                                  DESCRIPTION                                       DOCKER ENDPOINT                                ERROR
default *                             Current DOCKER_HOST based configuration           unix:///var/run/docker.sock                    
desktop-linux                                                                           unix:///Users/rasmus/.docker/run/docker.sock   
mrsk-app-native-remote-amd64   mrsk-app-native-remote amd64 native host   ssh://root@***

kjellberg avatar Mar 07 '23 06:03 kjellberg

Stumbled upon this too. As a workaround, mrsk build remove seems to work too.

calmyournerves avatar Mar 07 '23 08:03 calmyournerves

Me too. Thanks for this!

PabloC avatar May 04 '23 08:05 PabloC

I also ran into this problem. I'm using the stages feature and stumbled across it not updating the ip address of the machine. Very difficult to debug as I thought there was a cache lying around somewhere.

russ avatar Aug 07 '23 21:08 russ

I hit this today as well. Still appears to be an active issue in the latest release.

mvanholstyn avatar Oct 11 '23 20:10 mvanholstyn