- Create Gitlab account
- Host Drone http://docs.drone.io/install-for-gitlab/
- Create the Drone CD application in your gitlab with api scope (Access the authenticated user's API) https://gitlab.com/profile/applications
- Access your Drone domain and authenticate through Gitlab
Repository's sidebar menu: Settings > Project Settings > and mark "Trusted"
Depending on what you want, maybe creating a file/folder in the shared workspace is sufficient:
You can use volumes (in trusted repositories) to mount the Docker socket if what you want is to cache Docker images:
pipeline:
build-test-image:
image: docker:stable
# ...
volumes:
- /var/run/docker.sock:/var/run/docker.sock
backend:
image: myimage
commands:
- test
# ...
publish:
image: plugins/docker
registry: docker.io
secrets: [ docker_username, docker_password ]
repo: myimage
# ...
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- Repository's sidebar menu: Registry Is only useful for drone to pull images from your Registry, plugins like plugins/docker don't have access to those credentials to push images.