From: n1c00o Date: Sat, 14 Jan 2023 17:54:06 +0000 (+0100) Subject: Temporary update Docker images X-Git-Tag: v0.1.1~27 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=d92f8671ef56c0a9e2f71379559fc42cec0ebbf6;p=matthieu%2Fnova.git Temporary update Docker images This allows building Docker images for Nova on various Arch, including Darwin ARM (tested) --- diff --git a/Cargo.toml b/Cargo.toml index 691bdd9..d1d3ac4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,9 +5,9 @@ members = [ "exes/rest/", "exes/webhook/", "exes/ratelimit/", - "exes/all-in-one/", + "exes/all-in-one/", "libs/proto/", "libs/shared/", "libs/leash/" -] \ No newline at end of file +] diff --git a/Dockerfile b/Dockerfile index 339f77b..4b82766 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,7 @@ - - -FROM clux/muslrust:stable AS chef +FROM rust AS chef USER root RUN cargo install cargo-chef +RUN apt-get update && apt-get install -y protobuf-compiler WORKDIR /app # Planning install @@ -15,19 +14,19 @@ FROM chef AS builder COPY --from=planner /app/recipe.json recipe.json # Notice that we are specifying the --target flag! -RUN cargo chef cook --release --target x86_64-unknown-linux-musl --recipe-path recipe.json +RUN cargo chef cook --release --recipe-path recipe.json COPY . . -RUN cargo build --release --target x86_64-unknown-linux-musl +RUN cargo build --release # Base os -FROM alpine AS runtime-base -RUN addgroup -S nova && adduser -S nova -G nova -RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/* +FROM debian:latest AS runtime-base +# RUN addgroup -S nova && adduser -S nova -G nova +RUN apt-get update && apt-get install ca-certificates -y # Final os FROM runtime-base AS runtime ARG COMPONENT ENV COMPONENT=${COMPONENT} -COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/${COMPONENT} /usr/local/bin/ -USER nova +COPY --from=builder /app/target/release/${COMPONENT} /usr/local/bin/ +# USER nova ENTRYPOINT /usr/local/bin/${COMPONENT}