athome/Dockerfile

18 lines
535 B
Docker
Raw Normal View History

FROM rust:1.77.2 as builder
WORKDIR /athome/
RUN cargo install dioxus-cli@^0.5
RUN apt update && apt install nodejs npm -y && rm -rf /var/lib/apt/lists/*
RUN npm install -D tailwindcss
FROM builder
WORKDIR /athome/
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 fullstack --release
ENTRYPOINT [ "./dist/athome" ]