From f83006a0e10c9fa5c8bad5809101aa1ce27099f0 Mon Sep 17 00:00:00 2001 From: Eguzki Astiz Lezaun Date: Fri, 22 Sep 2023 15:16:12 +0200 Subject: [PATCH] build image to rust:1.72 --- Dockerfile | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8e44b28d..4e1c5bb7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,24 +2,10 @@ # Build Stage # ------------------------------------------------------------------------------ -FROM registry.access.redhat.com/ubi8/ubi:8.7 as limitador-build -ENV CARGO_NET_GIT_FETCH_WITH_CLI=true +FROM rust:1.72 as limitador-build -ARG RUSTC_VERSION=1.72.0 - -# the powertools repo is required for protobuf-c and protobuf-devel -RUN dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install \ - http://mirror.centos.org/centos/8-stream/BaseOS/`arch`/os/Packages/centos-gpg-keys-8-6.el8.noarch.rpm \ - http://mirror.centos.org/centos/8-stream/BaseOS/`arch`/os/Packages/centos-stream-repos-8-6.el8.noarch.rpm \ - && dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install epel-release \ - && dnf config-manager --set-enabled powertools - -RUN PKGS="gcc-c++ gcc-toolset-12-binutils-gold openssl-devel protobuf-c protobuf-devel git clang kernel-headers" \ - && dnf install --nodocs --assumeyes $PKGS \ - && rpm --verify --nogroup --nouser $PKGS \ - && yum -y clean all - -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path --profile minimal --default-toolchain ${RUSTC_VERSION} -c rustfmt -y +RUN apt update && apt upgrade -y +RUN apt install -y protobuf-compiler clang WORKDIR /usr/src/limitador @@ -29,8 +15,7 @@ ENV RUSTFLAGS="-C target-feature=-crt-static" COPY . . -RUN source $HOME/.cargo/env \ - && cargo build --release +RUN cargo build --release # ------------------------------------------------------------------------------ # Run Stage