forked from quickwit-oss/quickwit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
71 lines (53 loc) · 2.2 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
FROM rust:bullseye AS builder
ARG CARGO_FEATURES=release-feature-set
ARG CARGO_PROFILE=release
RUN echo "Adding Node.js PPA" \
&& curl -s https://deb.nodesource.com/setup_16.x | bash
RUN apt-get -y update \
&& apt-get -y install ca-certificates \
clang \
cmake \
libssl-dev \
llvm \
nodejs \
protobuf-compiler \
&& rm -rf /var/lib/apt/lists/*
# Required by tonic
RUN rustup component add rustfmt
# Build UI
COPY quickwit/quickwit-ui /quickwit/quickwit-ui
WORKDIR /quickwit/quickwit-ui
RUN echo "Building Quickwit UI" \
&& touch .gitignore_for_build_directory \
&& npm install --location=global yarn \
&& make install build
# Build workspace
COPY quickwit /quickwit
WORKDIR /quickwit
RUN echo "Building workspace with feature(s) '$CARGO_FEATURES' and profile '$CARGO_PROFILE'" \
&& cargo build \
--features $CARGO_FEATURES \
$(test "$CARGO_PROFILE" = "release" && echo "--release") \
&& echo "Copying binaries to /quickwit/bin" \
&& mkdir -p /quickwit/bin \
&& find target/$CARGO_PROFILE -maxdepth 1 -perm /a+x -type f -exec mv {} /quickwit/bin \;
# Change the default configuration file in order to make the REST,
# gRPC, and gossip services accessible outside of Docker container.
COPY config/quickwit.yaml /quickwit/config/quickwit.yaml
RUN sed -i 's/#[ ]*listen_address: 127.0.0.1/listen_address: 0.0.0.0/g' config/quickwit.yaml
FROM debian:bullseye-slim AS quickwit
LABEL org.opencontainers.image.title="Quickwit"
LABEL maintainer="Quickwit, Inc. <[email protected]>"
LABEL org.opencontainers.image.vendor="Quickwit, Inc."
LABEL org.opencontainers.image.licenses="AGPL-3.0"
RUN apt-get -y update \
&& apt-get -y install ca-certificates \
libssl1.1 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /quickwit
RUN mkdir config qwdata
COPY --from=builder /quickwit/bin/quickwit /usr/local/bin/quickwit
COPY --from=builder /quickwit/config/quickwit.yaml /quickwit/config/quickwit.yaml
ENV QW_CONFIG=/quickwit/config/quickwit.yaml
ENV QW_DATA_DIR=/quickwit/qwdata
ENTRYPOINT ["/usr/local/bin/quickwit"]