Skip to content

Commit

Permalink
update docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
avoonix committed Jun 23, 2024
1 parent c00647b commit c16ba73
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,22 @@ FROM rust:latest as builder
ARG RUST_TARGET
WORKDIR /wd
RUN apt-get update
RUN apt-get install -y cmake build-essential libopenblas-dev
RUN apt-get install -y cmake build-essential libopenblas-dev protobuf-compiler libsqlite3-dev
# RUN ln -s /bin/g++ /bin/musl-g++
ENV SYSROOT=/dummy
ENV LIBSQLITE3_FLAGS="-DSQLITE_ENABLE_MATH_FUNCTIONS"
ENV LIBSQLITE3_FLAGS="-DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_STAT4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_EXPLAIN"
# RUN rustup target add $RUST_TARGET
RUN cargo install cargo-leptos
RUN rustup target add wasm32-unknown-unknown
COPY . /wd
# RUN echo "bin-target-triple = \"$RUST_TARGET\"" >> Cargo.toml
RUN cargo leptos build --release -vv
RUN cargo build --release -vv

FROM rust:latest as runtime
ARG RUST_TARGET
# COPY --from=builder /wd/target/$RUST_TARGET/release/fuzzle-bot /
RUN apt-get update
RUN apt-get install -y libopenblas0
COPY --from=builder /wd/target/release/fuzzle-bot /
COPY --from=builder /wd/target/site /site
# COPY --from=builder /wd/target/site /site
EXPOSE 3000
ENV LEPTOS_SITE_ROOT="/site"
ENV LEPTOS_SITE_ADDR="0.0.0.0:3000"
ENTRYPOINT ["./fuzzle-bot"]
CMD ["help"]

0 comments on commit c16ba73

Please sign in to comment.