From 2694c82d97005ca39f29f540e26249c18a21f6d6 Mon Sep 17 00:00:00 2001 From: mo khan Date: Wed, 18 Jun 2025 17:11:42 -0600 Subject: refactor: switch to a pure rust implementation --- Dockerfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index d4e2b99d..3bb0e723 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,13 @@ # syntax=docker/dockerfile:1 -FROM golang:1.24.0 AS build -ENV CGO_ENABLED=0 +FROM rust:latest AS builder WORKDIR /app +RUN rustup target add x86_64-unknown-linux-musl COPY . ./ -RUN go build -o authzd ./cmd/authzd/main.go && mv ./authzd /bin/authzd - +RUN cargo build --release --target x86_64-unknown-linux-musl +RUN ls -alh /app FROM scratch -ENV BIND_ADDR=":http" -EXPOSE 80 +EXPOSE 50051 WORKDIR /var/www/ -COPY --from=build /bin/authzd /bin/authzd +COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/authzd /bin/authzd CMD ["/bin/authzd"] -- cgit v1.2.3