Dockerfile: only sync submodules if needed

This commit is contained in:
Binarybaron 2025-06-19 02:12:42 +02:00
parent 749216738c
commit 01fb542fae

View file

@ -42,9 +42,12 @@ ENV PATH="/root/.cargo/bin:${PATH}"
COPY . .
# Update submodules recursively
# Force update to handle any local changes in submodules
RUN git submodule sync --recursive && git submodule update --init --recursive --force
# Check that submodules are present (they should be initialized before building)
# Run: git submodule update --init --recursive before building this Docker image
RUN if [ ! -f "monero-sys/monero/CMakeLists.txt" ]; then \
echo "ERROR: Submodules not initialized. Run 'git submodule update --init --recursive' before building Docker image."; \
exit 1; \
fi
WORKDIR /build/swap