Docker Context
How to manage another docker instance e.g. deploy/manage docker compose files on a Raspberry Pi
Resources
Prerequisites
You should set up passwordless ssh access between your machines.
Adding a Remote Context
-
Create the context:
docker context create dietpi1 --docker "host=ssh://root@192.168.1.11"
-
View the new context using:
docker context ls
-
If you need to update the context:
docker context update --description "RaspberryPi 3b; DietPi" --docker "host=ssh://root@192.168.1.11" dietpi1
Deploying a Container to the Remote
Simply create your docker compose file and run: docker-compose --context dietpi1 up -d