Files
athome/Dockerfile
Tuan-Dat Tran 67243080b1
Some checks failed
Build Docker Image / Build (push) Has been cancelled
fix(fluent): Fixed labels for ftl file
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2024-12-12 22:32:37 +01:00

21 lines
623 B
Docker

FROM rust:1.80.1 AS dioxus
RUN cargo install dioxus-cli@^0.6
FROM dioxus AS builder
WORKDIR /athome/
RUN apt-get update && apt-get install nodejs npm libssl-dev musl-tools -y && rm -rf /var/lib/apt/lists/*
RUN npm install -D tailwindcss
COPY ./src/ ./src/
COPY ./assets/ ./assets/
COPY ./Cargo.toml ./Cargo.toml
COPY ./input.css ./input.css
COPY ./Dioxus.toml ./Dioxus.toml
COPY ./tailwind.config.js ./tailwind.config.js
RUN npx tailwindcss -i ./input.css -o ./assets/tailwind.css
RUN dx build --platform web --release
FROM dioxus AS runner
WORKDIR /app/
COPY --from=builder /athome/docs/ ./docs/
CMD [ "./docs/athome" ]