Skip to content

Commit 35860b5

Browse files
Fix jyq Dockerfile and rename to jyq.Dockerfile
- Rename Dockerfile.jyq -> jyq.Dockerfile for better IDE support (*.Dockerfile is the idiomatic naming for variant Dockerfiles) - Fix jq runtime error: use alpine:3.21 as runtime stage instead of scratch with cherry-picked libraries (jq needs libonig.so.5 which was missing) - Simplify Dockerfile: single alpine runtime stage with jq, yq, and ca-certificates installed via apk - Update release.yml to reference jyq.Dockerfile - Update CHANGELOG.md Verified locally: docker build -f Dockerfile -> OK, initium --version works docker build -f jyq.Dockerfile -> OK, jq/yq/initium all work jq processes JSON correctly in container
1 parent 899c0de commit 35860b5

3 files changed

Lines changed: 6 additions & 11 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
- uses: docker/build-push-action@v6
5252
with:
5353
context: .
54-
file: Dockerfile.jyq
54+
file: jyq.Dockerfile
5555
platforms: linux/amd64,linux/arm64
5656
push: true
5757
build-args: |

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111
- `exec` subcommand: run arbitrary commands with structured logging, exit code forwarding, and optional `--workdir` for child process working directory
12-
- `Dockerfile.jyq` and `initium-jyq` container image variant with pre-built `jq` and `yq` tools
12+
- `jyq.Dockerfile` and `initium-jyq` container image variant with pre-built `jq` and `yq` tools
1313
- Documentation for building custom images using Initium as a base
1414
- `fetch` subcommand and `internal/fetch` package: fetch secrets/config from HTTP(S) endpoints with auth header via env var, retry with backoff, TLS options, redirect control (same-site by default), and path traversal prevention
1515
- `render` subcommand and `internal/render` package: render templates into config files with `envsubst` (default) and Go `text/template` modes, path traversal prevention, and automatic intermediate directory creation

Dockerfile.jyq renamed to jyq.Dockerfile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,15 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
1212
go build -trimpath -ldflags="-s -w -X main.version=${VERSION}" \
1313
-o /initium ./cmd/initium
1414

15-
FROM alpine:3.21 AS tools
15+
FROM alpine:3.21
1616

17-
RUN apk add --no-cache jq yq
17+
RUN apk add --no-cache jq yq ca-certificates \
18+
&& rm -rf /var/cache/apk/*
1819

19-
FROM scratch
20-
21-
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
2220
COPY --from=builder /initium /initium
23-
COPY --from=tools /usr/bin/jq /usr/bin/jq
24-
COPY --from=tools /usr/bin/yq /usr/bin/yq
25-
COPY --from=tools /lib/ld-musl-* /lib/
26-
COPY --from=tools /usr/lib/libintl* /usr/lib/
2721

2822
USER 65534:65534
2923

3024
ENTRYPOINT ["/initium"]
3125

26+

0 commit comments

Comments
 (0)