Deploy containers (on RPI) using Visual Studio and GitHub

I am looking for information to deploy containers using code I create in Visual Studio Code, upload it to github and deploy it on my Raspberry Pi.

any suggestions?

Please refine your post and address the questions I post below to tell us about the process you have in mind.

Should vscode manage container deployments on a remote docker engine (in your case a RPi)?
Should vscode be used to write code and use a container on a remote docker engine as working context?
How should the images from that code be build? Using GithubActions or something else?
How should a container from the image be deployed to the RPi ?
Will this image be pushed to dockerhub or to another private container registry?

My goal is to automate as much as possible and in case of issues on my RPi, do a redeploy of the code.

If this can be done with GithubActions, I think that is a nice way to deploy containers. I would like to push the images to the RPI, if storing the images in dockerhub, that will be fine for me.

Basically I am looking to automate as much as possible to recover easily if needed. In case my RPi dies, replace it with a new RPI and push the config/images to it.

Would that work if I build the code in VScode and push it to GithubActions?
Or should I need something as Argo CD to further enhance the deployments?

I’ll be figuring it out when I know which tooling/solutions I could use for this.

Thanks for any assistance!

I am not sure, If I would realy want to walk down that road: I don’t know if it’s possible to register docker context’s in github actions, if it is, it can be used to securly access the docker engine on the pi to execute the deployment. If not, you would need to expose your docker engine to the internet, which should not be done, unless the endpoint is exposed as https endpoint with certificate authentification: Protect the Docker daemon socket | Docker Documentation

If done correct, you just push code changes to your github repo to trigger GithubActions, which build the image, push the image to dockerhub, and then issue the deployment to your docker engine (which must be reachable from the internet!).

Is Argo CD even able to deploy to anything other than k8s?

Update: About self-hosted runners - GitHub Docs might be a way to execute the GithubActions on a runner in your environment. It seems like the better approach, than to open your docker engine to the world. I never used it though.

Thank you for the inspiration. I’ll dive into it and see if I can make it work the way you mentioned.