Skip to content

Commit 7f6a899

Browse files
authored
fix: introduce alpine3.22 images (#411)
* fix: try older version to use older kernels * fix: remove legacy-kernel (debian) build, keep alpine3.22 only The debian-slim based legacy-kernel image did not work as intended. Remove its Dockerfile target, CI build/push steps, and FAQ references. Keep the alpine3.22 pinned variant which works correctly.
1 parent cd45247 commit 7f6a899

3 files changed

Lines changed: 62 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,38 @@ jobs:
126126
GITHUB_REPO=${{ steps.vars.outputs.repo }}
127127
GITHUB_SHA=${{ steps.vars.outputs.sha }}
128128
129+
- name: Docker meta for alpine3.22 image
130+
id: meta_alpine322
131+
uses: docker/metadata-action@v5
132+
with:
133+
images: |
134+
ghcr.io/raydak-labs/configarr
135+
docker.io/configarr/configarr,enable=${{ steps.set_platforms.outputs.MANUAL_RUN == 'false' }}
136+
tags: |
137+
type=ref,event=branch,prefix=dev-,suffix=-alpine3.22,enable=${{ steps.set_platforms.outputs.MANUAL_RUN == 'true' }}
138+
type=schedule,suffix=-alpine3.22,enable=${{ steps.set_platforms.outputs.MANUAL_RUN == 'false' }}
139+
type=ref,event=branch,suffix=-alpine3.22,enable=${{ steps.set_platforms.outputs.MANUAL_RUN == 'false' }}
140+
type=semver,pattern={{version}},suffix=-alpine3.22,enable=${{ steps.set_platforms.outputs.MANUAL_RUN == 'false' }}
141+
type=semver,pattern={{major}}.{{minor}},suffix=-alpine3.22,enable=${{ steps.set_platforms.outputs.MANUAL_RUN == 'false' }}
142+
type=semver,pattern={{major}},suffix=-alpine3.22,enable=${{ steps.set_platforms.outputs.MANUAL_RUN == 'false' }}
143+
144+
- name: Build and push alpine3.22 image
145+
uses: docker/build-push-action@v6
146+
with:
147+
context: .
148+
file: ./Dockerfile
149+
platforms: ${{ steps.set_platforms.outputs.platforms }}
150+
push: ${{ steps.set_platforms.outputs.push }}
151+
tags: ${{ steps.meta_alpine322.outputs.tags }}
152+
labels: ${{ steps.meta_alpine322.outputs.labels }}
153+
target: prod-alpine-3-22
154+
build-args: |
155+
CONFIGARR_VERSION=${{ steps.vars.outputs.version }}
156+
BUILD_TIME=${{ steps.vars.outputs.build_time }}
157+
GITHUB_RUN_ID=${{ steps.vars.outputs.run_id }}
158+
GITHUB_REPO=${{ steps.vars.outputs.repo }}
159+
GITHUB_SHA=${{ steps.vars.outputs.sha }}
160+
129161
# - name: Docker Hub Description
130162
# if: github.event_name != 'pull_request'
131163
# uses: peter-evans/dockerhub-description@v3

Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,19 @@ ARG CONFIGARR_VERSION=dev
6666
ENV CONFIGARR_VERSION=${CONFIGARR_VERSION}
6767
# Run with dumb-init to not start node with PID=1, since Node.js was not designed to run as PID 1
6868
CMD ["dumb-init", "node", "index.js"]
69+
70+
# Compatibility target pinned to Alpine 3.22.
71+
# Useful for testing old-kernel behavior with a fixed Alpine/git stack.
72+
FROM node:24.14.0-alpine3.22 AS prod-alpine-3-22
73+
WORKDIR /app
74+
75+
RUN apk add --no-cache libstdc++ dumb-init git
76+
77+
# Allow global git access independent of container user and directory user. See #240, #241
78+
RUN git config --global --add safe.directory '*'
79+
80+
COPY --from=builder /app/bundle.cjs /app/index.js
81+
82+
ARG CONFIGARR_VERSION=dev
83+
ENV CONFIGARR_VERSION=${CONFIGARR_VERSION}
84+
CMD ["dumb-init", "node", "index.js"]

docs/docs/faq.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,20 @@ env:
133133
134134
When this variable is set, Configarr will perform standard git clones without the `--filter=blob:none` or `--sparse` options, which should work with older kernel versions.
135135

136+
If your kernel is very old and the error still happens (for example `unable to get random bytes for temporary file: Function not implemented`), use the `alpine3.22` image tag which pins the Alpine base for compatibility:
137+
138+
```yaml
139+
services:
140+
configarr:
141+
image: ghcr.io/raydak-labs/configarr:<version>-alpine3.22
142+
```
143+
144+
Example:
145+
146+
```yaml
147+
image: ghcr.io/raydak-labs/configarr:v1.24.0-alpine3.22
148+
```
149+
136150
Reference issues:
137151

138152
- https://github.com/raydak-labs/configarr/issues/367

0 commit comments

Comments
 (0)