joyrex2001 / kubedock

Kubedock is a minimal implementation of the docker api that will orchestrate containers on a Kubernetes cluster, rather than running containers locally.
MIT License
217 stars 32 forks source link

Reasoning for mount #85

Closed GijsvanDulmen closed 7 months ago

GijsvanDulmen commented 7 months ago

Hi Kubedock!

We were wondering why this mount is needed:

https://github.com/joyrex2001/kubedock/blob/master/examples/tekton/resources/mvn-test.yaml#L42-L43

It even sounds a little risky to expose your source to the kubedock container. What was the reasoning behind this?

Regards, Gijs

joyrex2001 commented 7 months ago

The reason is when containers are binding/mounting volumes (docker -v). In that use case, kubedock needs to be able to access the files that should be mounted (similar as this would be required if it was a regular docker daemon sidecar). A lot of the testcontainer implementations don't rely on mounting volumes anymore (and copy files instead), which doesn't require the volume mount.

GijsvanDulmen commented 7 months ago

Thanks for the explanation! Will help the teams over here to decide if they need this mount.