Skip to content

Instantly share code, notes, and snippets.

@ap-wtioit
ap-wtioit / README.md
Last active June 27, 2022 03:08 — forked from jasonk/Jenkinsfile
Docker credential helper for authenticating from environment variables

docker-credential-gitlab_runner

This is a very basic Docker credential helper that uses environment variables to authenticate to Docker. It's not as secure as the other credential helpers that Docker provides, but it can be very helpful in some circumstances (such as when using it with Gitlab CI).

To set this up, install the docker-credentials-gitlab_runner script somewhere in the Gitlab runner users path (it needs to be named docker-credential-gitlab_runner), then configure the Gitlab runner user's ~/.docker/config.json file to use it: