Skip to content

Instantly share code, notes, and snippets.

@douglasmiranda
Created May 19, 2018 21:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save douglasmiranda/7387b278cad49cc8780647eaf800d132 to your computer and use it in GitHub Desktop.
Save douglasmiranda/7387b278cad49cc8780647eaf800d132 to your computer and use it in GitHub Desktop.
Notes about: Drone - Continuous Delivery

How to use volumes and privileged containers?

Repository's sidebar menu: Settings > Project Settings > and mark "Trusted"

How to cache:

Use the workspace

Depending on what you want, maybe creating a file/folder in the shared workspace is sufficient:

Docker Cache

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

Random notes

  • 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment