# 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 ARG AWS_DEFAULT_REGION ARG AWS_CONTAINER_CREDENTIALS_RELATIVE_URI # ENV SCCACHE_BUCKET=codepipeline-us-west-2-scccache # ENV SCCACHE_REGION=us-west-2 # ENV SCCACHE_S3_KEY_PREFIX=zincobserve/dev/amd64/ # ENV SCCACHE_NO_DAEMON=1 # ENV SCCACHE_LOG=debug RUN rustc --version && sccache --version WORKDIR /openobserve COPY . /openobserve COPY --from=webbuilder /web/dist web/dist RUN mkdir -p /openobserve/target/release/ RUN --mount=type=cache,target=/root/.cache/sccache cargo build --profile release-profiling --features mimalloc,cpu-profiling --target x86_64-unknown-linux-gnu \ && sccache --show-stats RUN mv /openobserve/target/x86_64-unknown-linux-gnu/release-profiling/openobserve /openobserve/target/release/openobserve # FROM gcr.io/distroless/cc as runtime 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 sysstat procps lsof net-tools sqlite3 RUN update-ca-certificates COPY --from=builder /openobserve/target/release/openobserve / RUN ["/openobserve", "init-dir", "-p", "/data/"] CMD ["/openobserve"]