add container init
MContainerfile
| @@ -18,11 +18,13 @@ FROM alpine:3.21 | |||
|---|---|---|---|
| 18 | 18 | WORKDIR /app | |
| 19 | 19 | ||
| 20 | 20 | # The musl-linked Bun binary still dynamically links libstdc++/libgcc. | |
| 21 | - | RUN apk add --no-cache libstdc++ libgcc | |
| 21 | + | # catatonit is a tiny init that reaps zombies and forwards signals to the server. | |
| 22 | + | RUN apk add --no-cache libstdc++ libgcc catatonit | |
| 22 | 23 | ||
| 23 | 24 | # The compiled server plus the static assets it serves from ./assets at runtime. | |
| 24 | 25 | COPY --from=build /app/zbin-server ./zbin-server | |
| 25 | 26 | COPY --from=build /app/assets ./assets | |
| 26 | 27 | ||
| 27 | 28 | EXPOSE 3000 | |
| 29 | + | ENTRYPOINT ["/usr/bin/catatonit", "--"] | |
| 28 | 30 | CMD ["./zbin-server"] | |