Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit 00a0c96

Browse files
authored
Update Dockerfile
1 parent 47d31ab commit 00a0c96

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ COPY . /app
2424
# Runtime stage: Create the final lightweight image
2525
FROM python:3.12-slim AS runtime
2626

27+
# Accept build argument for weaviate_data path
28+
ARG WEAVIATE_DATA_PATH
29+
2730
# Install runtime system dependencies
2831
RUN apt-get update && apt-get install -y --no-install-recommends \
2932
libgomp1 \
@@ -41,9 +44,13 @@ COPY --from=builder /app /app
4144
# Set the PYTHONPATH environment variable
4245
ENV PYTHONPATH=/app/src
4346

47+
# Copy weaviate_data into the container if the build argument exists
48+
# This step will only work if the build argument is set
49+
COPY ${WEAVIATE_DATA_PATH} /app/weaviate_data
50+
4451
# Allow to expose weaviate_data volume
4552
VOLUME ["/app/weaviate_data"]
4653

4754
# Set the container's default entrypoint
4855
EXPOSE 8989
49-
ENTRYPOINT ["python", "-m", "src.codegate.cli", "serve", "--port", "8989", "--host", "0.0.0.0"]
56+
ENTRYPOINT ["python", "-m", "src.codegate.cli", "serve", "--port", "8989", "--host", "0.0.0.0"]

0 commit comments

Comments
 (0)