Files
temporal/docker/targets/server.Dockerfile
Alex Stanfield 2b383993fc fix(ci): simplify manual docker build and centralize alpine tag (#9530)
## What changed?
- Centralized Alpine base image version to a single source of truth in
\`docker/docker-bake.hcl\` (\`ALPINE_TAG\`).
- Updated Docker targets to consume \`ALPINE_TAG\` from bake args
(removed duplicated Dockerfile defaults).
- Updated build action handling so an empty \`alpine-tag\` input does
not override bake defaults.
- Simplified manual Docker workflow inputs by removing platform/snapshot
toggles and hardcoding snapshot builds + multi-arch behavior for manual
runs.
- Clarified manual workflow input descriptions (\`cli-version\`,
\`alpine-tag\`, and push destination).

## Why?
- Avoid Alpine version drift across multiple files.
- Make manual dispatch safer and less error-prone (empty Alpine input
should use default, not fail with \`alpine:\`).
- Reduce confusing/no-op options in manual workflow while keeping
release behavior unchanged.

## Updating versions

**Alpine base image** — edit the \`ALPINE_TAG\` default in
\`docker/docker-bake.hcl\` (line 41):
```hcl
variable "ALPINE_TAG" {
  default = "3.23.3"  # <-- change this
}
```

**Temporal CLI** — edit the \`defaultCliVersion\` constant in
\`.github/actions/build-docker-images/scripts/main.go\` (line 17):
```go
// defaultCliVersion should be updated to the latest cli version
const defaultCliVersion = "1.6.1"  // <-- change this
```
To pin a different version for a one-off manual run without changing the
default, pass it via the \`cli-version\` workflow dispatch input
instead.

## Validation
- Triggered manual workflow against branch and confirmed branch is
available on upstream.
- Verified bake config resolves default Alpine tag from
\`docker/docker-bake.hcl\`.
2026-04-08 17:31:28 -05:00

21 lines
458 B
Docker

ARG ALPINE_TAG
FROM alpine:${ALPINE_TAG}
ARG TARGETARCH
RUN apk add --no-cache \
ca-certificates \
tzdata && \
apk upgrade --no-cache zlib && \
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" ]