|
@@ -5,17 +5,33 @@
|
|
|
# Build image #
|
|
|
#################
|
|
|
|
|
|
-FROM rust:1.60 AS build
|
|
|
+FROM ubuntu:22.04 as build
|
|
|
+
|
|
|
+RUN apt-get update -y && \
|
|
|
+ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
|
+ g++ \
|
|
|
+ curl \
|
|
|
+ ca-certificates \
|
|
|
+ libc6-dev \
|
|
|
+ make \
|
|
|
+ libssl-dev \
|
|
|
+ pkg-config \
|
|
|
+ git \
|
|
|
+ cmake \
|
|
|
+ zlib1g-dev
|
|
|
+
|
|
|
+RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
|
|
|
+ --default-toolchain stable --profile minimal -y
|
|
|
|
|
|
COPY . .
|
|
|
-RUN cargo test --release --all
|
|
|
-RUN cargo build --release
|
|
|
+RUN bash -c 'source $HOME/.cargo/env && cargo test --release --all'
|
|
|
+RUN bash -c 'source $HOME/.cargo/env && cargo build --release'
|
|
|
|
|
|
##################
|
|
|
# Output image #
|
|
|
##################
|
|
|
|
|
|
-FROM ubuntu:latest AS binary
|
|
|
+FROM ubuntu:22.04 AS binary
|
|
|
|
|
|
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
|
|
ca-certificates
|