Rename ctrld v2.0.0 to ctrld-client

Updates #565
This commit is contained in:
Cuong Manh Le
2026-09-03 13:57:38 +07:00
parent 80d1acdfd5
commit d8994cc7d8
30 changed files with 403 additions and 111 deletions
+13 -4
View File
@@ -5,9 +5,9 @@
# - Timezone info file.
# - CA certs file.
# - /etc/{passwd,group} file.
# - Non-cgo ctrld binary.
# - Non-cgo ctrld-client binary.
#
# CI_COMMIT_TAG is used to set the version of ctrld binary.
# CI_COMMIT_TAG is used to set the version of the ctrld-client binary.
FROM golang:1.25-bookworm AS base
WORKDIR /app
@@ -21,6 +21,15 @@ ARG tag=master
ENV CI_COMMIT_TAG=$tag
RUN CTRLD_NO_QF=yes CGO_ENABLED=0 ./scripts/build.sh
# Resolve the arch-suffixed build artifact to one fixed path, and fail the build
# if it is not there. A COPY glob that matches nothing does not reliably fail,
# which is how a rename can produce an image whose ENTRYPOINT names a binary the
# image does not contain.
RUN set -eu; \
set -- ctrld-client-linux-*-nocgo; \
[ "$#" -eq 1 ] && [ -x "$1" ] || { echo >&2 "no single executable build artifact: $*"; exit 1; }; \
mv -- "$1" /ctrld-client
FROM scratch
COPY --from=base /usr/share/zoneinfo /usr/share/zoneinfo
@@ -28,6 +37,6 @@ COPY --from=base /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=base /etc/passwd /etc/passwd
COPY --from=base /etc/group /etc/group
COPY --from=base /app/ctrld-linux-*-nocgo ctrld
COPY --from=base /ctrld-client ctrld-client
ENTRYPOINT ["./ctrld", "run"]
ENTRYPOINT ["./ctrld-client", "run"]
+13 -4
View File
@@ -5,9 +5,9 @@
# - Timezone info file.
# - CA certs file.
# - /etc/{passwd,group} file.
# - Non-cgo ctrld binary.
# - Non-cgo ctrld-client binary.
#
# CI_COMMIT_TAG is used to set the version of ctrld binary.
# CI_COMMIT_TAG is used to set the version of the ctrld-client binary.
FROM golang:1.25-bookworm AS base
WORKDIR /app
@@ -21,6 +21,15 @@ ARG tag=master
ENV CI_COMMIT_TAG=$tag
RUN CTRLD_NO_QF=yes CGO_ENABLED=0 ./scripts/build.sh
# Resolve the arch-suffixed build artifact to one fixed path, and fail the build
# if it is not there. A COPY glob that matches nothing does not reliably fail,
# which is how a rename can produce an image whose ENTRYPOINT names a binary the
# image does not contain.
RUN set -eu; \
set -- ctrld-client-linux-*-nocgo; \
[ "$#" -eq 1 ] && [ -x "$1" ] || { echo >&2 "no single executable build artifact: $*"; exit 1; }; \
mv -- "$1" /ctrld-client
FROM alpine
COPY --from=base /usr/share/zoneinfo /usr/share/zoneinfo
@@ -28,6 +37,6 @@ COPY --from=base /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=base /etc/passwd /etc/passwd
COPY --from=base /etc/group /etc/group
COPY --from=base /app/ctrld-linux-*-nocgo ctrld
COPY --from=base /ctrld-client ctrld-client
ENTRYPOINT ["./ctrld", "run"]
ENTRYPOINT ["./ctrld-client", "run"]