Files
openobserve/deploy/build/Dockerfile.tag-debug.amd64
T

34 lines
1.3 KiB
Docker

FROM public.ecr.aws/docker/library/node:18.12.1-bullseye 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/docker/library/rust:bullseye as builder
FROM public.ecr.aws/zinclabs/rust:bullseye-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-2023-05-21
# RUN rustup default nightly-2023-05-21
# RUN rustup target add x86_64-unknown-linux-gnu
WORKDIR /app
COPY . /app
COPY --from=webBuilder /web/dist web/dist
# RUN cargo build --release
RUN cargo build --release --features mimalloc --target x86_64-unknown-linux-gnu
RUN mv /app/target/x86_64-unknown-linux-gnu/release/openobserve /app/target/release/openobserve
FROM public.ecr.aws/debian/debian:bullseye-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
RUN update-ca-certificates
COPY --from=builder /app/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
CMD ["/openobserve"]