From d23e6bb60ce3018842ab6d0d5e7e354f36cce4a2 Mon Sep 17 00:00:00 2001 From: ChristianVisintin Date: Thu, 28 Jan 2021 12:03:11 +0100 Subject: [PATCH] centos7 dockerfile --- dist/build/x86_64_centos7/Dockerfile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 dist/build/x86_64_centos7/Dockerfile diff --git a/dist/build/x86_64_centos7/Dockerfile b/dist/build/x86_64_centos7/Dockerfile new file mode 100644 index 0000000..570f3ec --- /dev/null +++ b/dist/build/x86_64_centos7/Dockerfile @@ -0,0 +1,25 @@ +FROM centos:centos7 as builder + +WORKDIR /usr/src/ +# Install dependencies +RUN yum -y install \ + git \ + gcc \ + openssl \ + pkgconfig \ + openssl-devel +# Install rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /tmp/rust.sh && \ + chmod +x /tmp/rust.sh && \ + /tmp/rust.sh -y +# Clone repository +RUN git clone https://github.com/veeso/termscp.git +# Set workdir to termscp +WORKDIR /usr/src/termscp/ +# Install cargo arxch +RUN source $HOME/.cargo/env && cargo install cargo-rpm +# Build for x86_64 +RUN source $HOME/.cargo/env && cargo build --release +# Build pkgs +RUN source $HOME/.cargo/env && yum -y install rpm-build && cargo rpm init && cargo rpm build +CMD ["sh"]