-
-
-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
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}