summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-06-18 17:11:42 -0600
committermo khan <mo@mokhan.ca>2025-06-18 17:11:42 -0600
commit2694c82d97005ca39f29f540e26249c18a21f6d6 (patch)
tree259be3c918a047e26fb357b406d915315aa0ead5 /Dockerfile
parentc2b8edab01b23fde6cc196a3349ad6aa19a93299 (diff)
refactor: switch to a pure rust implementation
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile13
1 files changed, 6 insertions, 7 deletions
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"]