-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.full
More file actions
56 lines (42 loc) · 1.94 KB
/
Copy pathDockerfile.full
File metadata and controls
56 lines (42 loc) · 1.94 KB
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
# syntax=docker/dockerfile:1
#
# Kitchen-sink build: every supported Iceberg catalog backend compiled in
# (REST, HMS, Glue, S3 Tables, Postgres SQL, Hadoop). Same simple layout as
# Dockerfile; only the cargo feature set differs.
#
# Slim Polaris/REST-only image: use Dockerfile (default).
ARG RUST_VERSION=1.97.1
FROM rust:${RUST_VERSION}-bookworm AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \
cmake protobuf-compiler libprotobuf-dev libssl-dev pkg-config clang lld \
&& rm -rf /var/lib/apt/lists/*
ENV RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=lld"
WORKDIR /build
COPY Cargo.toml Cargo.lock ./
COPY crates/ crates/
COPY vendor/ vendor/
COPY xtask/ xtask/
RUN cargo build --release --locked \
--features sqe-catalog/full-backends \
--bin sqe-server --bin sqe-worker --bin sqe-cli \
&& mkdir -p /build/out \
&& cp target/release/sqe-server target/release/sqe-worker \
target/release/sqe-cli /build/out/
FROM cgr.dev/chainguard/glibc-dynamic@sha256:df4e22a4b5dcd8e15a51fe9b04e16717d411dd9f4fe4b3844c1bf425b14be303
USER 65532
ARG VERSION=dev
ARG BUILD_DATE
ARG GIT_REVISION
LABEL org.opencontainers.image.title="sqe-full" \
org.opencontainers.image.description="Sovereign Query Engine with all catalog backends compiled in" \
org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.created="${BUILD_DATE}" \
org.opencontainers.image.revision="${GIT_REVISION}" \
org.opencontainers.image.source="https://github.com/schuberg/sqe"
COPY --from=builder /build/out/ /usr/local/bin/
COPY --from=busybox:1.38.0-uclibc@sha256:297dda192bda2157ddf40abb47a45a1090caff1864db9cfb9ce4b901ba318a3c \
/bin/wget /usr/local/bin/wget
EXPOSE 50051 50052 8080 9090 9091
HEALTHCHECK --interval=10s --timeout=3s --start-period=10s --retries=3 \
CMD ["/usr/local/bin/wget", "-q", "-O", "/dev/null", "http://127.0.0.1:9091/healthz"]
ENTRYPOINT ["/usr/local/bin/sqe-server"]