I’m tying to use Gitlab to deploy prebuild (ie. linuxserver.io) containers to my docker host.
First followed the following guide; using gitlab CI/CD to deploy sonarr and others. Since that needs a copy of the original repro, its a no-go.
Tried various .gitlab-ci.yml, now have;
image: docker:latest
variables:
DOCKER_DRIVER: overlay2
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
stages:
- deploy
deploy-container:
stage: deploy
script:
- export DOCKER_HOST=tcp://localhost:2375
- docker-compose down
- docker-compose pull
- docker-compose -f docker-compose.yml up -d
Is there a way with gitlab to only pull and deploy the image specified in the compose file.
If so please point me in the right direction.