basecamp / kamal

Deploy web apps anywhere.
https://kamal-deploy.org
MIT License
10.51k stars 398 forks source link

Build failure: Docker image cannot be built due to missing Git submodules #848

Closed fabiendv closed 1 month ago

fabiendv commented 3 months ago

When attempting to build a Docker image that depends on a repository with Git submodules, the build process fails because the git -C command does not include the submodules.

Actual Behavior

The git -C command does not automatically include submodules, leading to a build failure due to missing submodule content.

Proposed Solution

Add an option to the git -C command that allows for the inclusion of submodules, similar to the --recurse-submodules flag available in other Git commands.

Environment

Kamal version: 1.7.1

djmb commented 3 months ago

Thanks for reporting this @fabiendv! As a workaround, you can set the build context to . which will build directly from the checkout but will include any uncommited changes.

fabiendv commented 3 months ago

Thanks @djmb

I confirm the following lines work:

builder:
  context: .
djmb commented 1 month ago

The original issue should be fixed by https://github.com/basecamp/kamal/pull/889