GaneshPatil7517 commented on code in PR #19863:
URL: https://github.com/apache/datafusion/pull/19863#discussion_r2702071813


##########
docs/Dockerfile:
##########
@@ -0,0 +1,74 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+FROM python:3.11-slim
+
+# Install system dependencies
+RUN apt-get update && apt-get install -y --no-install-recommends \
+    curl \
+    build-essential \
+    graphviz \
+    && rm -rf /var/lib/apt/lists/*
+
+# Install Rust 1.92.0
+ENV RUST_VERSION=1.92.0
+ENV RUSTUP_VERSION=1.27.1
+RUN set -eux; \
+    arch="$(uname -m)"; \
+    case "${arch}" in \
+        x86_64) rustup_arch="x86_64-unknown-linux-gnu" ;; \
+        aarch64) rustup_arch="aarch64-unknown-linux-gnu" ;; \
+        *) echo "Unsupported architecture: ${arch}" >&2; exit 1 ;; \
+    esac; \
+    curl --proto '=https' --tlsv1.2 -sSf \
+        
"https://static.rust-lang.org/rustup/archive/${RUSTUP_VERSION}/${rustup_arch}/rustup-init";
 \
+        -o rustup-init; \
+    chmod +x rustup-init; \
+    ./rustup-init \
+        --default-toolchain "${RUST_VERSION}" \
+        --component rustfmt \
+        --profile minimal \
+        -y; \
+    rm rustup-init
+
+ENV PATH="/root/.cargo/bin:${PATH}"
+
+# Install cargo-depgraph
+RUN cargo install cargo-depgraph --version ^1.6 --locked
+
+# Set working directory
+WORKDIR /work
+
+# Copy Python requirements and install them
+COPY docs/requirements.txt /work/docs/requirements.txt
+RUN pip install --no-cache-dir -r /work/docs/requirements.txt
+
+# Copy the entire repository
+COPY . /work

Review Comment:
   You're right, I've removed the COPY . /work approach. Instead, the 
repository should be mounted as a volume at runtime. This keeps the image lean 
and allows users to build docs from their current working tree without 
rebuilding the image.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to