Remove GreptimeDB reference build files
Some checks failed
Build Alpine Packages / build-and-publish (push) Failing after 20s

This commit is contained in:
Joachim Schlöffel
2026-06-08 23:47:01 +02:00
parent edc68c825b
commit af5f4db9b4
3 changed files with 1 additions and 132 deletions

View File

@@ -1,77 +0,0 @@
# syntax=docker/dockerfile:1.7
ARG ALPINE_VERSION=3.23
ARG RUST_VERSION=1.90.0
FROM alpine:${ALPINE_VERSION} AS builder
ARG GREPTIMEDB_REF=main
ARG RUST_VERSION
RUN apk add --no-cache \
bash \
ca-certificates \
curl \
git \
build-base \
linux-headers \
clang \
lld \
mold \
cmake \
make \
perl \
pkgconf \
protobuf \
protobuf-dev \
zlib-dev \
zlib-static \
zstd-dev \
zstd-static \
openssl-dev \
openssl-libs-static \
binutils \
coreutils
ENV RUSTUP_HOME=/usr/local/rustup
ENV CARGO_HOME=/usr/local/cargo
ENV PATH=/usr/local/cargo/bin:${PATH}
ENV CARGO_BUILD_JOBS=2
ENV LIBRARY_PATH=/usr/lib
RUN curl https://sh.rustup.rs -sSf | sh -s -- \
-y \
--profile minimal \
--default-toolchain ${RUST_VERSION}
WORKDIR /src
RUN git clone https://github.com/GreptimeTeam/greptimedb.git . \
&& git checkout ${GREPTIMEDB_REF}
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/local/cargo/git \
cargo build \
--release \
--locked \
--bin greptime \
--features servers/dashboard
RUN mkdir -p /out \
&& cp /src/target/release/greptime /out/greptime.debug \
&& cp /src/target/release/greptime /out/greptime \
&& strip /out/greptime \
&& ls -lh /out \
&& file /out/greptime \
&& ldd /out/greptime || true
FROM scratch AS artifact
COPY --from=builder /out/greptime /greptime
COPY --from=builder /out/greptime.debug /greptime.debug
FROM alpine:${ALPINE_VERSION} AS runtime
RUN apk add --no-cache ca-certificates
COPY --from=builder /out/greptime /usr/local/bin/greptime
ENTRYPOINT ["/usr/local/bin/greptime"]

View File

@@ -1,53 +0,0 @@
IMAGE ?= greptime-alpine-builder
RUNTIME_IMAGE ?= greptime-alpine
GREPTIMEDB_REF ?= main
ALPINE_VERSION ?= 3.23
RUST_VERSION ?= 1.90.0
OUT_DIR ?= dist
.PHONY: artifact image build inspect run clean
artifact:
mkdir -p $(OUT_DIR)
docker build \
--target artifact \
--build-arg GREPTIMEDB_REF=$(GREPTIMEDB_REF) \
--build-arg ALPINE_VERSION=$(ALPINE_VERSION) \
--build-arg RUST_VERSION=$(RUST_VERSION) \
--output type=local,dest=$(OUT_DIR) .
chmod +x $(OUT_DIR)/greptime
build:
docker build \
--target builder \
--build-arg GREPTIMEDB_REF=$(GREPTIMEDB_REF) \
--build-arg ALPINE_VERSION=$(ALPINE_VERSION) \
--build-arg RUST_VERSION=$(RUST_VERSION) \
-t $(IMAGE):$(GREPTIMEDB_REF) .
image:
docker build \
--target runtime \
--build-arg GREPTIMEDB_REF=$(GREPTIMEDB_REF) \
--build-arg ALPINE_VERSION=$(ALPINE_VERSION) \
--build-arg RUST_VERSION=$(RUST_VERSION) \
-t $(RUNTIME_IMAGE):$(GREPTIMEDB_REF) .
inspect: artifact
file $(OUT_DIR)/greptime
ldd $(OUT_DIR)/greptime || true
ls -lh $(OUT_DIR)/greptime $(OUT_DIR)/greptime.debug
run: image
docker run --rm -it \
-p 127.0.0.1:4000-4003:4000-4003 \
-v "$$(pwd)/greptimedb_data:/greptimedb_data" \
$(RUNTIME_IMAGE):$(GREPTIMEDB_REF) \
standalone start \
--http-addr 0.0.0.0:4000 \
--rpc-bind-addr 0.0.0.0:4001 \
--mysql-addr 0.0.0.0:4002 \
--postgres-addr 0.0.0.0:4003
clean:
rm -rf $(OUT_DIR)

View File

@@ -2,8 +2,7 @@
This package builds `greptime` from the upstream GreptimeDB source release.
The old `Dockerfile` and `Makefile` in this directory are reference material for
the previous manual build. The APKBUILD uses the same build shape directly:
The APKBUILD builds the release directly:
```sh
cargo build --release --locked --bin greptime --features servers/dashboard