From 2ead92a20470b6928280c2082e3a358f102de3c8 Mon Sep 17 00:00:00 2001 From: Mikail Bagishov Date: Tue, 11 May 2021 19:28:32 +0300 Subject: [PATCH] Use alpine for images --- build-env/Dockerfile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/build-env/Dockerfile b/build-env/Dockerfile index 2c44c7e..c3702fb 100644 --- a/build-env/Dockerfile +++ b/build-env/Dockerfile @@ -1,21 +1,22 @@ # Build context: parent directory -FROM rust:slim-bullseye as create-build-env -RUN apt-get update && apt-get install -y --no-install-recommends \ - gcc g++ cmake python3 make +FROM alpine:edge as create-build-env +RUN apk add gcc g++ cmake python3 make rust +RUN apk add cargo COPY . /pps WORKDIR /pps ENV PYTHONUNBUFFERED=1 RUN python3 ./build-env/make.py --out /build-env -FROM rust:slim as build-pps +FROM alpine:edge as build-pps +RUN apk add rust +RUN apk add cargo COPY . /pps WORKDIR /pps RUN cargo install --path cli -FROM ubuntu:focal -RUN apt-get update && apt-get install -y --no-install-recommends \ - gcc g++ cmake python3 make +FROM alpine:edge +RUN apk add gcc g++ cmake python3 make WORKDIR /usr/local/bin -COPY --from=build-pps /usr/local/cargo/bin/pps-cli pps-cli +COPY --from=build-pps /root/.cargo/bin/pps-cli pps-cli COPY --from=create-build-env /build-env /opt/pps-build-env ENV JJS_PATH=/opt/pps-build-env