jiengup commented on code in PR #3656:
URL: https://github.com/apache/iggy/pull/3656#discussion_r3571603181


##########
.devcontainer/Dockerfile:
##########
@@ -0,0 +1,64 @@
+# 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.
+
+# Toolchain is pinned by rust-toolchain.toml (channel 1.96.0). The base
+# image ships rustup, so the pin auto-resolves on first cargo invocation.
+ARG RUST_VERSION=1.96
+FROM rust:${RUST_VERSION}-slim-trixie
+
+# Build + runtime dependencies mirror the production Dockerfile builder
+# stage (native TLS, hwloc topology, udev). git/curl/gnupg/sudo/pkg-config
+# round out the dev shell.
+RUN apt-get update && apt-get install -y --no-install-recommends \
+    build-essential \
+    ca-certificates \
+    curl \
+    git \
+    gnupg \
+    pkg-config \
+    libssl-dev \
+    libhwloc-dev \
+    libudev-dev \
+    liblzma5 \
+    sudo \
+    && rm -rf /var/lib/apt/lists/*
+
+# Pin Node.js to the major version CI uses to build the web UI
+# (.github/workflows/_build_rust_artifacts.yml). NodeSource ships nodejs
+# with a bundled npm, so Debian's unversioned packages are not used.
+ARG NODE_VERSION=22
+RUN curl -fsSL "https://deb.nodesource.com/setup_${NODE_VERSION}.x"; | bash - \
+    && apt-get install -y --no-install-recommends nodejs \
+    && rm -rf /var/lib/apt/lists/*
+
+# Pre-fetch the pinned toolchain components (rustfmt, clippy) so the first
+# in-container build does not stall resolving them. rust-src is added for
+# rust-analyzer sysroot / standard-library resolution.
+COPY rust-toolchain.toml /tmp/rust-toolchain.toml
+RUN cd /tmp && rustup show && rustup component add rust-src && rm 
rust-toolchain.toml

Review Comment:
   As of now, we don't have a good way to specify that the long version number 
of the docker image is consistent with `rust-toolchain.toml`.



-- 
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]

Reply via email to