Some checks failed
Build Docker Image / Build (push) Has been cancelled
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
22 lines
659 B
Docker
22 lines
659 B
Docker
FROM rust:1.84.0 AS dioxus
|
|
RUN cargo install dioxus-cli@^0.6
|
|
|
|
FROM dioxus AS builder
|
|
WORKDIR /athome/
|
|
RUN apt-get update && apt install libwebkit2gtk-4.1-dev build-essential curl npm \
|
|
wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev -y\
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
RUN npm install -D tailwindcss
|
|
COPY ./Cargo.toml ./Cargo.toml
|
|
COPY ./Dioxus.toml ./Dioxus.toml
|
|
COPY ./input.css ./input.css
|
|
COPY ./tailwind.config.js ./tailwind.config.js
|
|
COPY ./src/ ./src/
|
|
COPY ./assets/ ./assets/
|
|
RUN dx bundle --platform web
|
|
|
|
FROM dioxus AS runner
|
|
WORKDIR /app/
|
|
COPY --from=builder /athome/target/dx/athome/release/web/ ./
|
|
CMD [ "./server" ]
|