Skip to content

Commit

Permalink
install protoc binary for cross on centos7
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanpharvey committed Aug 30, 2024
1 parent 4be679e commit 14241de
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cross.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[target.x86_64-unknown-linux-gnu]
image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main-centos"
dockerfile = "./tools/docker/Dockerfile.centos"
16 changes: 16 additions & 0 deletions tools/docker/Dockerfile.centos
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main-centos

# CentOS 7 is EOL
# Find and replace mirror.centos.org with vault.centos.org
# Remove the # sign at the beginning of lines containing baseurl=http to enable baseurl usage instead of disabling it
# Add a # sign to the beginning of lines containing mirrorlist=http to disable the use of mirrorlist
RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo \
&& sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo \
&& sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo

RUN yum update -y \
&& yum install -y unzip \
&& yum install -y which

COPY ./scripts/install-protoc.sh .
RUN chmod +x ./install-protoc.sh && ./install-protoc.sh

0 comments on commit 14241de

Please sign in to comment.