Commit e669ca4
committed
fix(docker): fix distroless build failure and upgrade to debian12
## Problem
Distroless Docker image build has been failing in CI/CD since v1.1.45 (4+ months ago).
This prevented the distroless image from being published to Docker Hub.
Error: `exec /bin/sh: no such file or directory`
Root cause: Distroless base image does not contain shell, but Dockerfile used heredoc
syntax which requires `/bin/sh` to execute.
## Solution
1. Create all symlinks in build stage (where shell is available)
- ln -s /usr/local/bin/bun /usr/local/bin/bunx
- ln -s /usr/local/bin/bun /usr/local/bun-node-fallback-bin/node
2. In distroless stage, only COPY symlinks (no RUN commands needed)
- COPY --from=build /usr/local/bin/bunx
- COPY --from=build /usr/local/bun-node-fallback-bin/
3. Upgrade base image from debian11 to debian12
- Fixes security vulnerabilities (1 HIGH CVE → 0)
- Uses gcr.io/distroless/base-debian12
## Testing
- Local build: ✅ Success (linux/amd64)
- Azure-dev build: ✅ Success (linux/amd64)
- Verified symlinks: ✅ All working (bun, bunx, node)
- Image size: 228MB (comparable to debian variant at 221MB)
## Related Issues
Closes oven-sh#20414
Closes oven-sh#16666
Related to oven-sh#22601, oven-sh#197881 parent 908ab9c commit e669ca4
1 file changed
+9
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
59 | 64 | | |
60 | 65 | | |
61 | 66 | | |
| |||
67 | 72 | | |
68 | 73 | | |
69 | 74 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
83 | 78 | | |
84 | 79 | | |
0 commit comments