I know Kubernetes has rest API to automate deploy docker image on it. and i know how to use it by Gitlab runner. I wonder if portainer has this feature to call a rest API and deploy my image on it ? I mean how to use recreate container or create container like in portainer ui as a pi service ? Is there any better way to do this?
1 Answer
What you can do, it add a stack to portainer that gets its docker-compose file from your gitlab git repository. Of course you need to add your gitlab registry as a docker registry to portainer first.
3 Comments
Nick M
Bart does it grab the rest of the repo as well (like Dockerfiles for images referenced in the docker-compose file using build/context), or is it just the docker-compose file that gets pulled?
Nick M
Thank you Bart for giving some hope to a tired old man! Going to play with it tonight
Ragav Y
Exactly what I was looking for. I was trying to add my repo as a container or as an image and it wasn't working. You have to add it as a stack.