Make /drone/src workspace a tmpfs?

Hi, I am performing some ARM64 CI builds on a physical Raspberry Pi. It has plenty of RAM for my workload but the local disk is an sdcard with limited write lifespan.

Is it possible to make /drone/src a tmpfs? Then the build would be in-RAM and not impact the sdcard’s lifespan.

I thought it might be the case, but it seems like it’s not currently:

  • docker inspect of the running container shows /drone/src with Driver=local and Source="/var/lib/docker/volumes/${ID}/_data"
  • mount on the Docker host shows no tmpfs mounted anywhere below /var/lib/docker/

I already tried:

volumes:
- name: cachefs
  temp: {}

# then under each step of the pipeline
volumes:
- name: cachefs
  path: /drone/src

but when running, it complains that /drone/src is mounted twice.

I also tried making a second tmpfs, and having every pipeline stage cd into my tmpfs directory, with a custom clone step too. It seemed to work but i’m not sure if it really did.

Is it possible to make /drone/src a tmpfs?

this is not possible

but when running, it complains that /drone/src is mounted twice.

this is because the workspace (/drone/src) is already a volume and you cannot mount two docker volumes at the same path.