dioxus Docker & Self-Hosted Deployment

GitHub

Fullstack app framework for web, desktop, and mobile.

38,605 stars Rust Rust 1 file ยท ~3,328 tokens #android#css#desktop#html#ios#native#react#rust
1. Pull Image (DOCKERHUB) docker pull DioxusLabs/dioxus:latest
2. Docker Run (1-Click Launch) docker run -d --name dioxus -p 8080:8080 --restart always dioxuslabs/dioxus:latest
3. Podman Run podman run -d --name dioxus -p 8080:8080 --restart always dioxuslabs/dioxus:latest
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/dioxuslabs/dioxus:latest
5. ORAS Pull (OCI Artifact) oras pull dioxuslabs/dioxus:latest
examples/01-app-demos/hotdog/Dockerfile
FROM rust:1 AS chef
RUN cargo install cargo-chef
WORKDIR /app

FROM chef AS planner
COPY . .
RUN cargo chef prepare --recipe-path recipe.json

FROM chef AS builder
COPY --from=planner /app/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json
COPY . .
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/DioxusLabs/dioxus/refs/heads/main/.github/install.sh | bash
RUN /.cargo/bin/dx bundle --platform web --features production

FROM chef AS runtime
COPY --from=builder /app/target/dx/hotdog/release/web/ /usr/local/app

ENV PORT=8080
ENV IP=0.0.0.0
EXPOSE 8080

WORKDIR /usr/local/app
ENTRYPOINT [ "/usr/local/app/server" ]