If the /buildkite directory of the host is mounted inside of the agent, the docker container fails to start, as it can't find buildkite-agent, which is in /buildkite/bin/, which doesn't necessarily exist on the host.
Since volume mounts still need to be based on the host systems filesystem, the subdirectory /buildkite/builds:/buildkite/builds is mounted instead, as it's only the build content that needs to be shared.
If the
/buildkite
directory of the host is mounted inside of the agent, the docker container fails to start, as it can't findbuildkite-agent
, which is in/buildkite/bin/
, which doesn't necessarily exist on the host.Since volume mounts still need to be based on the host systems filesystem, the subdirectory
/buildkite/builds:/buildkite/builds
is mounted instead, as it's only the build content that needs to be shared.