summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
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"]