From f4df827b35fcebcdc0833a23e1aa72e74dfc9ea2 Mon Sep 17 00:00:00 2001
From: Laurent Modolo <laurent.modolo@ens-lyon.fr>
Date: Thu, 23 Feb 2023 15:23:15 +0100
Subject: [PATCH] Dockerfile: decrease image size

---
 Dockerfile | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 259d453..51c9357 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,10 @@
 # SPDX-FileCopyrightText: 2023 Laurent Modolo <laurent.modolo@ens-lyon.fr>
 #
 # SPDX-License-Identifier: AGPL-3.0-or-later
-FROM rust:1.66.1
+FROM rust:1.67-alpine3.17 AS build
 
-RUN cargo install --git http://gitbio.ens-lyon.fr/LBMC/Bernard/bamcalib.git
+RUN apk add --no-cache musl-dev pkgconfig openssl-dev && cargo install --git http://gitbio.ens-lyon.fr/LBMC/Bernard/bamcalib.git
+
+FROM alpine:3.17
+
+COPY --from=build /usr/local/cargo/bin/bamcalib /usr/bin/
-- 
GitLab