From f48cd5783ec1f457786d01a272121029d6a699e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=9CM=C3=9C=C5=9E?= <96421894+Tahinli@users.noreply.github.com> Date: Sat, 1 Jun 2024 01:40:49 +0300 Subject: [PATCH] build: :green_heart: minimize container --- Dockerfile | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7505e87..2ea6b2a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,15 @@ -FROM rust:1.77.2-alpine3.18 -COPY Cargo.toml ./ -COPY src ./src -RUN apk update -RUN apk add musl-dev -RUN cargo build --release -CMD [ "/target/release/acapair_follow_ban_api"] \ No newline at end of file +FROM linuxcontainers/debian-slim:latest + +#COPY Cargo.toml ./ +#COPY src ./src +COPY target/release/acapair_follow_ban_api . +#RUN apk add --no-cache musl-dev curl gcc +# RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +# ENV PATH="/root/.cargo/bin:${PATH}" +# RUN cargo build --release +# RUN cp /target/release/acapair_follow_ban_api . +# RUN cargo clean +# RUN rustup self uninstall -y +# RUN apk del musl-dev curl gcc +# RUN rm Cargo.lock +CMD [ "./acapair_follow_ban_api"] \ No newline at end of file