mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 16:09:05 +00:00
37 lines
1.5 KiB
Docker
37 lines
1.5 KiB
Docker
# syntax=docker/dockerfile:1
|
|
FROM public.ecr.aws/docker/library/node:24-trixie AS webbuilder
|
|
WORKDIR /web
|
|
COPY ./web /web/
|
|
|
|
RUN npm install
|
|
RUN NODE_OPTIONS="--max-old-space-size=8192" npm run build
|
|
|
|
FROM public.ecr.aws/zinclabs/rust:trixie-sccache AS builder
|
|
# RUN apt-get update
|
|
# RUN apt-get install -y protobuf-compiler
|
|
# RUN apt-get install -y cmake curl
|
|
|
|
# RUN rustup toolchain install nightly-2026-10-24
|
|
# RUN rustup default nightly-2026-10-24
|
|
# RUN rustup target add x86_64-unknown-linux-gnu
|
|
|
|
WORKDIR /openobserve
|
|
COPY . /openobserve
|
|
COPY --from=webbuilder /web/dist web/dist
|
|
RUN mkdir -p /openobserve/target/release/
|
|
|
|
# RUN cargo build --release
|
|
RUN cargo build --profile release-prod --features mimalloc --target x86_64-unknown-linux-gnu
|
|
RUN mv /openobserve/target/x86_64-unknown-linux-gnu/release-prod/openobserve /openobserve/target/release/openobserve
|
|
|
|
FROM public.ecr.aws/debian/debian:trixie-slim AS runtime
|
|
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates
|
|
RUN apt-get install -y curl htop iftop nload iptraf ncdu tcpdump sysstat procps lsof net-tools sqlite3
|
|
RUN update-ca-certificates
|
|
COPY --from=builder /openobserve/target/release/openobserve /
|
|
COPY --from=builder /lib/x86_64-linux-gnu/liblzma.so.5 /lib/x86_64-linux-gnu/liblzma.so.5
|
|
COPY --from=builder /lib/x86_64-linux-gnu/libz.so.1 /lib/x86_64-linux-gnu/libz.so.1
|
|
COPY --from=builder /lib/x86_64-linux-gnu/libbz2.so.1.0 /lib/x86_64-linux-gnu/libbz2.so.1.0
|
|
RUN ["/openobserve", "init-dir", "-p", "/data/"]
|
|
CMD ["/openobserve"]
|