harness / gitness

Gitness is an Open Source developer platform with Source Control management, Continuous Integration and Continuous Delivery.
https://gitness.com
Apache License 2.0
31.96k stars 2.79k forks source link

Drone Issue | Where is host volumes data stored in drone runner container? #3467

Closed eli-yip closed 5 months ago

eli-yip commented 6 months ago

I use self-hosted drone server and drone runner which all run in docker containers. I use host volumes features to set up cache for speeding up my building steps like this:

volumes
  - name: gocache
    host:
      path: /var/lib/cache/gocache

Everything works fine, building is much quicker than before. However, when I try to figure out where is the host volume data stored, I came into problems.

I have only one drone runner, so I think my cache files will in my drone container, and its path will be /var/lib/cache/gocache. When I try to list with command docker run drone-runner ls /var/lib/cache, only apk and misc are listed.

The cache works fine, but where is the cache files actually? I have no idea, could you offer to help?

FYI: my drone runner version is 1.8.3, while drone server version is 2.22.0.

bradrydzewski commented 5 months ago

The host machine docker socket is mounted inside the runner, which means the running is launching containers and mounting volumes on the host. As a result, nothing is run or stored inside the runner.