When building from a worktree, the common git directory was not mounted in docker. This lead to the version not being set and issues with git-cache in ubuntu bionic that could not execute the 'git hash-object' command.