Skip to content

Commit a4deb47

Browse files
committed
Move protoc within updater
Signed-off-by: clux <sszynrae@gmail.com>
1 parent 93d1104 commit a4deb47

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,6 @@ RUN apt-get update && apt-get install -y \
3535
--no-install-recommends && \
3636
rm -rf /var/lib/apt/lists/*
3737

38-
# Install a more recent release of protoc (protobuf-compiler in jammy is 4 years old and misses some features)
39-
ENV PROTOC_VER="25.2"
40-
RUN cd /tmp && \
41-
curl -sSL https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VER}/protoc-${PROTOC_VER}-linux-x86_64.zip -o protoc.zip && \
42-
unzip protoc.zip && \
43-
cp bin/protoc /usr/bin/protoc && \
44-
rm -rf *
45-
4638
# Install rust using rustup
4739
ARG CHANNEL
4840
ENV RUSTUP_VER="1.26.0" \
@@ -65,12 +57,20 @@ ENV SSL_VER="1.1.1q" \
6557
ZLIB_VER="1.3.1" \
6658
PQ_VER="11.12" \
6759
SQLITE_VER="3430100" \
60+
PROTOC_VER="25.2" \
6861
CC=musl-gcc \
6962
PREFIX=/musl \
7063
PATH=/usr/local/bin:/root/.cargo/bin:$PATH \
7164
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig \
7265
LD_LIBRARY_PATH=$PREFIX
7366

67+
# Install a more recent release of protoc (protobuf-compiler in jammy is 4 years old and misses some features)
68+
RUN cd /tmp && \
69+
curl -sSL https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VER}/protoc-${PROTOC_VER}-linux-x86_64.zip -o protoc.zip && \
70+
unzip protoc.zip && \
71+
cp bin/protoc /usr/bin/protoc && \
72+
rm -rf *
73+
7474
# Set up a prefix for musl build libraries, make the linker's job of finding them easier
7575
# Primarily for the benefit of postgres.
7676
# Lastly, link some linux-headers for openssl 1.1 (not used herein)

update_libs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def rustup_version():
8686
#'PQ': pkgver('postgresql-old-upgrade'), # see https://github.com/clux/muslrust/issues/81
8787
'SQLITE': convert_sqlite_version(pkgver('sqlite')),
8888
'SSL': convert_openssl_version(pkgver('openssl')),
89+
'PROTOBUF': pkgver('protobuf'),
8990
'ZLIB': pkgver('zlib'),
9091
'RUSTUP': rustup_version()
9192
}

0 commit comments

Comments
 (0)