0

Got a question about docker contexts, Fellas.

  • Assuming we make a docker-compose context for a remote machine (i.e., `docker context create aaa --docker "host=ssh://root@1.1.1.1")
  • And build it and run it on the remote machine (i.e., docker-compose --context aaa up -d)
  • Now the machine is running. Let's say I left my computer and my colleague using their computer wants to check some logs for the machine (i.e., run docker-compose --context aaa logs)

How can we sync the state of contexts? Should I prepare a file to run the first docker context create aaa command for them, and after that, docker-compose can recognize the running machine?

Cheers

jimmytann
  • 111
  • 1

1 Answers1

0

I ended up making a bash file with a bunch of docker context create blah --docker "host=ssh://blah@ip" commands that other devs can run and it'll sync the state for them. I know there are docker context export/import commands, but the format was not clean and it produces a file per context, which is subpar.

jimmytann
  • 111
  • 1