Thank you both for your replies, this has really helped my understanding.
@matthiasradde - your approach is really interesting, so rather than using docker contexts, you use pure cli commands and then have a second and separate docker-compose file that references the newly tagged images on the production server. This is really neat, as it means that I can continue to use my existing docker compose file to build on the build server.
@meyay - thanks for your help here, this makes allot of sense. So using docker contexts the docker compose process uses the local docker-compose file and just instructs the remote hosts docker engine api to perform the commands rather than the local one.
I think the bulk of my issue is that my docker-compose file doesn’t reference the newly tagged images. So I either need to use a second docker-compose file on the production server and use a process like Matthias, or I can continue using docker contexts, but build using docker build rather than compose, and also change the single docker-compose file to reference the new images in order to run the containers. (I will take the second option as it’s closer to my current workflow).
Thanks both for your replies.