Skip to content

Commit c7fd13a

Browse files
cdeckerendothermicdev
authored andcommitted
repro: Add protoc dependency to repro-build
1 parent d1402e0 commit c7fd13a

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

contrib/reprobuild/Dockerfile.bionic

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ ENV TZ=UTC
44
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
55
ENV RUST_PROFILE=release
66
ENV PATH=/root/.cargo/bin:/root/.pyenv/shims:/root/.pyenv/bin:$PATH
7+
ENV PROTOC_VERSION=22.0
78

89
RUN sed -i '/updates/d' /etc/apt/sources.list && \
910
sed -i '/security/d' /etc/apt/sources.list
@@ -47,6 +48,14 @@ RUN wget https://sh.rustup.rs -O rustup-install.sh && \
4748
rm rustup-install.sh && \
4849
/root/.cargo/bin/rustup install 1.62
4950

51+
# Download protoc manually, it is in the update repos which we
52+
# disabled above, so `apt-get` can't find it anymore.
53+
RUN cd /tmp/ && \
54+
wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
55+
unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
56+
mv bin/protoc /usr/local/bin && \
57+
rm -rf include bin protoc-${PROTOC_VERSION}-linux-x86_64.zip
58+
5059
RUN mkdir /build
5160
WORKDIR /build
5261

contrib/reprobuild/Dockerfile.focal

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ ENV TZ=UTC
44
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
55
ENV RUST_PROFILE=release
66
ENV PATH=/root/.cargo/bin:$PATH
7+
ENV PROTOC_VERSION=22.0
78

89
RUN sed -i '/updates/d' /etc/apt/sources.list && \
910
sed -i '/security/d' /etc/apt/sources.list
@@ -36,6 +37,14 @@ RUN wget https://sh.rustup.rs -O rustup-install.sh && \
3637
rm rustup-install.sh && \
3738
/root/.cargo/bin/rustup install 1.62
3839

40+
# Download protoc manually, it is in the update repos which we
41+
# disabled above, so `apt-get` can't find it anymore.
42+
RUN cd /tmp/ && \
43+
wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
44+
unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
45+
mv bin/protoc /usr/local/bin && \
46+
rm -rf include bin protoc-${PROTOC_VERSION}-linux-x86_64.zip
47+
3948
RUN mkdir /build
4049
WORKDIR /build
4150

contrib/reprobuild/Dockerfile.jammy

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ ENV TZ=UTC
44
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
55
ENV RUST_PROFILE=release
66
ENV PATH=/root/.cargo/bin:$PATH
7+
ENV PROTOC_VERSION=22.0
78

89
RUN sed -i '/updates/d' /etc/apt/sources.list && \
910
sed -i '/security/d' /etc/apt/sources.list
@@ -37,6 +38,14 @@ RUN wget https://sh.rustup.rs -O rustup-install.sh && \
3738
rm rustup-install.sh && \
3839
/root/.cargo/bin/rustup install 1.62
3940

41+
# Download protoc manually, it is in the update repos which we
42+
# disabled above, so `apt-get` can't find it anymore.
43+
RUN cd /tmp/ && \
44+
wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
45+
unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
46+
mv bin/protoc /usr/local/bin && \
47+
rm -rf include bin protoc-${PROTOC_VERSION}-linux-x86_64.zip
48+
4049
RUN mkdir /build
4150
WORKDIR /build
4251

0 commit comments

Comments
 (0)