fix: Docker build now compiles submodules correctly

- Remove .gitmodules from .dockerignore so the build loop can discover
  which directories to compile
- Add git to Dockerfile apt installs (needed for git config --file parsing)
- Gate git submodule update --init on .git presence, not .gitmodules;
  the compile loop still runs in Docker since .gitmodules is now present
- hashcat skipped in Docker build loop since system hashcat is in PATH

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Justin Bollinger
2026-02-20 16:25:48 -05:00
parent 67ed8c1ee3
commit d51158c1d3
3 changed files with 3 additions and 3 deletions

View File

@@ -1,5 +1,4 @@
.git
.gitmodules
.gitignore
.DS_Store
.idea

View File

@@ -7,6 +7,7 @@ RUN apt-get update \
build-essential \
ca-certificates \
curl \
git \
gzip \
hashcat \
ocl-icd-libopencl1 \

View File

@@ -5,8 +5,8 @@ hashcat-utils: submodules
$(MAKE) -C hashcat-utils
submodules:
@# Initialize submodules when present
@if [ -f .gitmodules ] && command -v git >/dev/null 2>&1; then \
@# Initialize submodules only when inside a git repo (not in Docker/CI copies)
@if [ -d .git ] && [ -f .gitmodules ] && command -v git >/dev/null 2>&1; then \
git submodule update --init --recursive; \
fi; \
$(MAKE) submodules-pre; \