Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3859167
Add Server and Admin tools images and local build tooling
chaptersix Nov 19, 2025
7537a07
Update new server Dockerfile to use new config loading.
chaptersix Nov 19, 2025
67d2afb
Refactor and address PR comments from Cusor.
chaptersix Nov 20, 2025
3c2e49b
Merge branch 'main' into alex/docker-image-re-v2
chaptersix Nov 21, 2025
06557a1
add es tool to new image
chaptersix Nov 20, 2025
923bee5
update new entrypoint script to use sh arg and small tweak to downloa…
chaptersix Nov 21, 2025
e2918ef
Update .github/docker/scripts/sh/entrypoint.sh
chaptersix Nov 21, 2025
e6e79f7
Apply suggestions from code review
chaptersix Nov 21, 2025
8458753
Merge branch 'main' into alex/docker-image-re-v2
chaptersix Nov 25, 2025
2696141
remove scripts that are no longer needed and refactor
chaptersix Nov 25, 2025
16caecf
fix tmp binaries causing large image size
chaptersix Nov 25, 2025
dd978c5
rm alpine_image default arg
chaptersix Nov 25, 2025
995388e
Merge branch 'main' into alex/docker-image-re-v2
chaptersix Nov 26, 2025
d77ee32
use go install instead of downlaoding a binary
chaptersix Nov 26, 2025
c0cda5b
Update .github/docker/targets/admin-tools.Dockerfile
chaptersix Dec 3, 2025
0de8f5e
remove legacy image building
chaptersix Dec 3, 2025
5784a60
swap to using go scripts and remove entrypoint ans start-temporal scr…
chaptersix Dec 3, 2025
c4dfefd
add back the minimal entrypoint script
chaptersix Dec 3, 2025
947c4a9
refactor build process a bit. note these scripts and make file will b…
chaptersix Dec 3, 2025
9dc6387
Merge branch 'main' into alex/docker-image-re-v2
chaptersix Dec 3, 2025
b2cb527
Apply suggestions from code review
chaptersix Dec 4, 2025
ea7da7c
rm temporal address
chaptersix Dec 4, 2025
e139f15
change admin tools to copy all binaries in a single step
chaptersix Dec 4, 2025
8026900
removing build scripts. they did their job in validating the image bu…
chaptersix Dec 4, 2025
edb5dc3
sh lint suppression
chaptersix Dec 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/docker/docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
variable "SERVER_VERSION" {
default = "1.29.1"
}

variable "CLI_VERSION" {
default = "1.5.0"
}

variable "IMAGE_REPO" {
default = "temporaliotest"
}

variable "IMAGE_SHA_TAG" {}

variable "IMAGE_BRANCH_TAG" {}

variable "SAFE_IMAGE_BRANCH_TAG" {
default = join("-", [for c in regexall("[a-z0-9]+", lower(IMAGE_BRANCH_TAG)) : c])
}

variable "TEMPORAL_SHA" {
default = ""
}

variable "TAG_LATEST" {
default = false
}

# Legacy targets (legacy-admin-tools, legacy-server) are for building images with server versions
# older than v1.27.0 (3 minor versions behind v1.30.0). Once support for pre-1.27.0 versions is
# no longer needed, these legacy targets can be removed and only the standard targets should be used.

target "admin-tools" {
dockerfile = "targets/admin-tools.Dockerfile"
tags = compact([
"${IMAGE_REPO}/admin-tools:${IMAGE_SHA_TAG}",
"${IMAGE_REPO}/admin-tools:${SAFE_IMAGE_BRANCH_TAG}",
TAG_LATEST ? "${IMAGE_REPO}/admin-tools:latest" : "",
])
platforms = ["linux/amd64", "linux/arm64"]
labels = {
"org.opencontainers.image.title" = "admin-tools"
"org.opencontainers.image.description" = "Temporal admin tools"
"org.opencontainers.image.url" = "https://github.com/temporalio/temporal"
"org.opencontainers.image.source" = "https://github.com/temporalio/temporal"
"org.opencontainers.image.licenses" = "MIT"
"org.opencontainers.image.version" = "${SERVER_VERSION}"
"org.opencontainers.image.revision" = "${TEMPORAL_SHA}"
"org.opencontainers.image.created" = timestamp()
"com.temporal.server.version" = "${SERVER_VERSION}"
"com.temporal.cli.version" = "${CLI_VERSION}"
}
}

target "server" {
dockerfile = "targets/server.Dockerfile"
tags = compact([
"${IMAGE_REPO}/server:${IMAGE_SHA_TAG}",
"${IMAGE_REPO}/server:${SAFE_IMAGE_BRANCH_TAG}",
TAG_LATEST ? "${IMAGE_REPO}/server:latest" : "",
])
platforms = ["linux/amd64", "linux/arm64"]
labels = {
"org.opencontainers.image.title" = "server"
"org.opencontainers.image.description" = "Temporal Server"
"org.opencontainers.image.url" = "https://github.com/temporalio/temporal"
"org.opencontainers.image.source" = "https://github.com/temporalio/temporal"
"org.opencontainers.image.licenses" = "MIT"
"org.opencontainers.image.version" = "${SERVER_VERSION}"
"org.opencontainers.image.revision" = "${TEMPORAL_SHA}"
"org.opencontainers.image.created" = timestamp()
"com.temporal.server.version" = "${SERVER_VERSION}"
}
}
16 changes: 16 additions & 0 deletions .github/docker/scripts/sh/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
# pipefail is included in alpine
# shellcheck disable=SC3040
set -eu -o pipefail

# Resolve hostname to IP address for binding if not already set (supports both IPv4 and IPv6)
: "${BIND_ON_IP:=$(getent hosts "$(hostname)" | awk '{print $1;}')}"
export BIND_ON_IP

# If binding to wildcard address (0.0.0.0 or ::0), set broadcast address if not already set
if [ "${BIND_ON_IP}" = "0.0.0.0" ] || [ "${BIND_ON_IP}" = "::0" ]; then
: "${TEMPORAL_BROADCAST_ADDRESS:=$(getent hosts "$(hostname)" | awk '{print $1;}')}"
export TEMPORAL_BROADCAST_ADDRESS
fi

exec temporal-server start
23 changes: 23 additions & 0 deletions .github/docker/targets/admin-tools.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM alpine:3.22@sha256:4b7ce07002c69e8f3d704a9c5d6fd3053be500b7f1c69fc0d80990c2ad8dd412

ARG TARGETARCH

RUN apk add --no-cache \
ca-certificates \
tzdata && addgroup -g 1000 temporal && \
adduser -u 1000 -G temporal -D temporal

# Copy all admin tool binaries:
# - temporal (CLI)
# - temporal-server
# - temporal-cassandra-tool
# - temporal-sql-tool
# - temporal-elasticsearch-tool
# - tdbg
COPY --chmod=755 ./build/${TARGETARCH}/* /usr/local/bin/

COPY ./build/temporal/schema /etc/temporal/schema

USER temporal

CMD ["sh", "-c", "trap exit INT HUP TERM; sleep infinity"]
16 changes: 16 additions & 0 deletions .github/docker/targets/server.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM alpine:3.22@sha256:4b7ce07002c69e8f3d704a9c5d6fd3053be500b7f1c69fc0d80990c2ad8dd412

ARG TARGETARCH

RUN apk add --no-cache \
ca-certificates \
tzdata && addgroup -g 1000 temporal && \
adduser -u 1000 -G temporal -D temporal

COPY --chmod=755 ./build/${TARGETARCH}/temporal-server /usr/local/bin/
COPY --chmod=755 ./scripts/sh/entrypoint.sh /etc/temporal/entrypoint.sh

WORKDIR /etc/temporal
USER temporal

CMD [ "/etc/temporal/entrypoint.sh" ]
Loading