'DOCKER_CERT_PATH on gitlab shared runners
Colleagues, hello. I'm learning how to set up ci/cd and deployment for production. I use the shared runners gitlab. And I don't understand how I can specify DOCKER_CERT_PATH in gitlab shared runners . If I understood correctly, DOCKER_CERT_PATH is the path to the local folder on the runner machine. So I need to use my personal runner only? And on my personal runner I have to add certificates to the local folder, and specify it in DOCKER_CERT_PATH?
I am wonna use gitlab-ci config like this -
.deploy-script: &deploy-script
script:
- docker-compose -f docker-compose.base.yml -f docker-compose.$CI_COMMIT_REF_SLUG.yml pull
- docker-compose -f docker-compose.base.yml -f docker-compose.$CI_COMMIT_REF_SLUG.yml up -d -V
- docker image prune -af
deploy:staging:
stage: deploy
environment:
name: staging
url: '$SERVER_PROTOCOL://$SERVER_NAME_DEV'
variables:
DOCKER_TLS_VERIFY: '1'
DOCKER_HOST: 'tcp://$SERVER_IP_DEV:2376'
DOCKER_CERT_PATH: '/certs/${CI_PROJECT_PATH_SLUG}-staging/'
SERVER_NAME: '${SERVER_NAME_DEV}'
<<: *deploy-script
only:
- dev
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
