From bdcb0ddbbd1bdca7b2c3c4a2240b3fef11a50ca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=A3rebe=20-=20Romain=20GERARD?= Date: Sat, 21 Oct 2023 17:01:32 +0200 Subject: [PATCH] Update Dockerfile Former-commit-id: 8d641440227dba9e956433206907ee8907593b82 [formerly 344e8a30b34d1d1695638a352c6601149bf5fc88] [formerly 5c24156ddfbe29981c628598a230a17fa7ead6c4 [formerly 1041b4af40fd8c6f189a13bc7ea1980fd40fb977]] Former-commit-id: b63126e8a1bd9304e91828ab30c72ebb04f2c812 [formerly d516e15a7420610d130a572a724190ecf15678e6] Former-commit-id: 02f1cbd58b36eb1b416b64df9d857a24866d32b4 Former-commit-id: 7777b39fe0ee8a4421578eae43a3af8b870af91e Former-commit-id: 475f2f6f0564bf611a2a0129cbb9b8f466769983 Former-commit-id: 6f77659bc79c02139550f4366a9597b5362463c2 [formerly fb41f997d9c2fb551819eb918f268999a875bfa7] Former-commit-id: b58e203e9b3277aa3e44cfba6017d23efabdce3c --- Dockerfile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index eb82ccf..71ad97d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,9 @@ ARG BUILDER_IMAGE=builder_cache -ARG ALPINE_IMAGE_TAG=3.18 ############################################################ # Cache image with all the deps -FROM rust:1.73-alpine${ALPINE_IMAGE_TAG} AS builder_cache +FROM rust:1.73-bookworm AS builder_cache -RUN apk add musl-dev RUN rustup component add rustfmt clippy WORKDIR /build @@ -39,10 +37,14 @@ RUN cargo build --profile=${PROFILE} ${BIN_TARGET} ############################################################ # Final image -FROM alpine:${ALPINE_IMAGE_TAG} as final-image +FROM debian:bookworm-slim as final-image -RUN apk add dumb-init && \ - adduser -Ds /bin/sh app +RUN useradd -ms /bin/bash app && \ + apt-get update && \ + apt-get -y upgrade && \ + apt install -y --no-install-recommends ca-certificates dumb-init && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists WORKDIR /home/app