build: make binary name a Dockerfile "ARG" (#3254)

* build: make binary name a Dockerfile "ARG"

* Update Dockerfile
This commit is contained in:
LFC
2024-01-29 16:00:40 +08:00
committed by GitHub
parent d43c638515
commit fc25b7c4ff

View File

@@ -2,6 +2,9 @@ FROM ubuntu:22.04
# The root path under which contains all the dependencies to build this Dockerfile.
ARG DOCKER_BUILD_ROOT=.
# The binary name of GreptimeDB executable.
# Defaults to "greptime", but sometimes in other projects it might be different.
ARG TARGET_BIN=greptime
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
ca-certificates \
@@ -16,8 +19,8 @@ RUN python3 -m pip install -r /etc/greptime/requirements.txt
ARG TARGETARCH
ADD $TARGETARCH/greptime /greptime/bin/
ADD $TARGETARCH/$TARGET_BIN /greptime/bin/
ENV PATH /greptime/bin/:$PATH
ENTRYPOINT ["greptime"]
ENTRYPOINT ["$TARGET_BIN"]