Jan Jaworski
Jan Jaworski

Reputation: 189

How to automatically deploy and run docker images on server?

I'm trying to setup the deployment of docker images to Linux server (Debian 10). I looked over the internet to find an easy solution to deploy images from docker repository onto a server automatically. I know that Docker Hub has webhooks. Also, there is an option to use Kubernetes, but it seems to be a bit too much for a simple application running on one server. What I am looking for is a way for server to detect that docker image has been updated, so that it downloads it and runs the newest version.

Currently, I have setup automatic build of docker images on Azure DevOps that are pushed to private repository on Docker Hub (I will most likely move to privately hosted Nexus repository). I am looking for suggestions on how to do it with relatively low complexity (e.g. should I use docker-compose for it or some sort of bash script on a server).

The closest thing to what I am looking for is this solution: How to auto deploy Docker Image on own server with GitLab? I would like to know if this is the recommended way to do or are there any other, possibly easier ways to approach it.

Upvotes: 4

Views: 10177

Answers (1)

Jan Jaworski
Jan Jaworski

Reputation: 189

I found this project that looks good as a solution for my case.

https://containrrr.github.io/watchtower/

Upvotes: 5

Related Questions