mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-10 07:46:59 +00:00
Fix Docker build: clean host artifacts after copy to prevent conflicts
- Add cleanup step in copy-source target to remove build/, ollama, and dist/ - Prevents host build artifacts from interfering with container builds - Ensures clean build environment when switching between host and Docker workflows - docker cp doesn't respect .dockerignore, so explicit cleanup is needed
This commit is contained in:
@@ -114,7 +114,9 @@ stop-builder:
|
|||||||
copy-source: start-builder
|
copy-source: start-builder
|
||||||
@echo "→ Copying source code to container..."
|
@echo "→ Copying source code to container..."
|
||||||
@docker cp $(SOURCE_DIR)/. $(CONTAINER_NAME):/usr/local/src/ollama37/
|
@docker cp $(SOURCE_DIR)/. $(CONTAINER_NAME):/usr/local/src/ollama37/
|
||||||
@echo " Source code copied"
|
@echo "→ Cleaning any host build artifacts from container..."
|
||||||
|
@docker exec $(CONTAINER_NAME) rm -rf /usr/local/src/ollama37/build /usr/local/src/ollama37/ollama /usr/local/src/ollama37/dist
|
||||||
|
@echo " Source code copied (clean build environment)"
|
||||||
|
|
||||||
# Run CMake configuration
|
# Run CMake configuration
|
||||||
run-cmake: copy-source
|
run-cmake: copy-source
|
||||||
|
|||||||
Reference in New Issue
Block a user