Add 'tini' as init process for docker

This commit is contained in:
Nikolay Govorov
2025-12-08 14:21:47 +00:00
parent ed3a562d84
commit 1fd61ce6a4

View File

@@ -58,6 +58,9 @@ RUN make build
FROM debian:stable-slim
RUN apt-get update -yq && \
apt-get install -yq tini
# copy ca certificates
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
@@ -65,4 +68,8 @@ COPY --from=0 /browser/zig-out/bin/lightpanda /bin/lightpanda
EXPOSE 9222/tcp
# Lightpanda install only some signal handlers, and PID 1 doesn't have a default SIGTERM signal handler.
# Using "tini" as PID1 ensures that signals work as expected, so e.g. "docker stop" will not hang.
# (See https://github.com/krallin/tini#why-tini).
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["/bin/lightpanda", "serve", "--host", "0.0.0.0", "--port", "9222"]