Spaces:
Paused
Paused
| FROM alpine:3.21 AS source | |
| RUN apk add --no-cache git | |
| WORKDIR /app | |
| RUN git clone --depth=1 https://github.com/AmethystDev-Labs/kiro.rs.git . | |
| FROM node:22-alpine AS frontend-builder | |
| WORKDIR /app | |
| COPY --from=source /app /app | |
| WORKDIR /app/admin-ui | |
| RUN npm install -g pnpm && pnpm install | |
| RUN pnpm build | |
| FROM rustlang/rust:nightly AS builder | |
| WORKDIR /app | |
| COPY --from=source /app /app | |
| COPY --from=frontend-builder /app/admin-ui/dist /app/admin-ui/dist | |
| RUN cargo build --release --features embed-admin-ui | |
| FROM debian:bookworm-slim | |
| RUN apt-get update && \ | |
| apt-get install -y ca-certificates curl openssl jq xxd && \ | |
| rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY --from=builder /app/target/release/kiro-rs /app/kiro-rs | |
| COPY start.sh /app/start.sh | |
| RUN chmod +x /app/start.sh | |
| EXPOSE 7860 | |
| CMD ["/app/start.sh"] |