]> git.puffer.fish Git - matthieu/nova.git/commitdiff
Temporary update Docker images
authorn1c00o <n@nc0.fr>
Sat, 14 Jan 2023 17:54:06 +0000 (18:54 +0100)
committern1c00o <n@nc0.fr>
Sat, 14 Jan 2023 17:54:06 +0000 (18:54 +0100)
This allows building Docker images for Nova on various Arch, including Darwin ARM (tested)

Cargo.toml
Dockerfile

index 691bdd9d2068893d5db17584d0ac76d0bdc0b218..d1d3ac45cb4126f4bc50de4c73f2cd07f6de0147 100644 (file)
@@ -5,9 +5,9 @@ members = [
     "exes/rest/",\r
     "exes/webhook/",\r
     "exes/ratelimit/",\r
-    "exes/all-in-one/",\r
+               "exes/all-in-one/",\r
 \r
     "libs/proto/",\r
     "libs/shared/",\r
     "libs/leash/"\r
-]
\ No newline at end of file
+]\r
index 339f77bcc5008913c069e36c30bed24018907a0d..4b82766e17e479c0a56661568c426b604cf0f79f 100644 (file)
@@ -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}