This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new a17292d6cf chore(devcontainer): use debian's `protobuf-compiler` 
package (#16687)
a17292d6cf is described below

commit a17292d6cf7f5ff7277168cad8439fea05b1a622
Author: Julius von Froreich <[email protected]>
AuthorDate: Tue Jul 8 23:47:01 2025 +0200

    chore(devcontainer): use debian's `protobuf-compiler` package (#16687)
    
    * chore(devcontainer): use debian's `protobuf-compiler` package
    
    unfortunately, the current `Dockerfile` does not set the `PATH` variable
    correctly. the `RUN` directive is evaluated at build time. thus, the
    `$HOME` variable is resolved correctly to `/root/` when
    installing the `protoc` binary; the binary ends up in
    `/root/.local/bin/protoc`.
    in contrast, an `ENV` directive is evaluated at a container's runtime,
    so if `$HOME` is not correctly set at runtime, the `PATH` addition
    `$HOME/.local/bin` resolves to `/.local/bin`, which does not exist.
    since the linked docs now also recommend to use a package manager
    to install the `protoc` compiler, the `Dockerfile` does the same now.
    
    at the time of writing, bookworm's version is `libprotoc 3.21.12`,
    which is higher than the required version of `3.15`.
    
    * add `libprotobuf-dev` to include google's common proto type files
---
 .devcontainer/Dockerfile | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 9dd627b01a..51111543b4 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -5,9 +5,7 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
     && apt-get purge -y imagemagick imagemagick-6-common
 
 # Add protoc
-# 
https://datafusion.apache.org/contributor-guide/getting_started.html#protoc-installation
-RUN curl -LO 
https://github.com/protocolbuffers/protobuf/releases/download/v25.1/protoc-25.1-linux-x86_64.zip
 \
-    && unzip protoc-25.1-linux-x86_64.zip -d $HOME/.local \
-    && rm protoc-25.1-linux-x86_64.zip
-
-ENV PATH="$PATH:$HOME/.local/bin"
\ No newline at end of file
+# 
https://datafusion.apache.org/contributor-guide/development_environment.html#protoc-installation
+RUN apt-get update \
+    && apt-get install -y --no-install-recommends protobuf-compiler 
libprotobuf-dev \
+    && rm -rf /var/lib/apt/lists/*


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

Reply via email to