Skip to content

Commit 01c1d02

Browse files
authored
[ENH]: fix container signal handling & use Debian in published image (#3854)
## Description of changes Noticed that SIGTERM was not correctly handled (results in commands like `docker stop` taking at least 10s before the engine sends a `SIGKILL`). ## Test plan *How are these changes tested?* Verified that `docker stop` now immediately stops the container.
1 parent 5e7f70e commit 01c1d02

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

rust/cli/Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
FROM rust:1.81.0-alpine AS builder
1+
FROM rust:1.81.0 AS builder
22

33
ARG RELEASE_MODE=
44

55
WORKDIR /chroma
66

77
ENV PROTOC_ZIP=protoc-25.1-linux-x86_64.zip
8-
RUN apk add curl musl-dev alpine-sdk \
9-
&& curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v25.1/$PROTOC_ZIP \
8+
RUN curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v25.1/$PROTOC_ZIP \
109
&& unzip -o $PROTOC_ZIP -d /usr/local bin/protoc \
1110
&& unzip -o $PROTOC_ZIP -d /usr/local 'include/*' \
1211
&& rm -f $PROTOC_ZIP
@@ -25,13 +24,15 @@ RUN --mount=type=cache,sharing=locked,target=/chroma/target/ \
2524
if [ "$RELEASE_MODE" = "1" ]; then mv target/release/chroma ./chroma; else mv target/debug/chroma ./chroma; fi
2625

2726

28-
FROM scratch AS runner
27+
FROM debian:stable-slim AS runner
28+
29+
RUN apt-get update && apt-get install -y dumb-init && rm -rf /var/lib/apt/lists/*
2930

3031
COPY --from=builder /chroma/rust/frontend/sample_configs /sample_configs
3132
COPY --from=builder /chroma/rust/frontend/sample_configs/docker_single_node.yaml /config.yaml
3233
COPY --from=builder /chroma/chroma /usr/local/bin/chroma
3334

3435
EXPOSE 8000
3536

36-
ENTRYPOINT [ "chroma" ]
37+
ENTRYPOINT [ "dumb-init", "--", "chroma" ]
3738
CMD [ "run", "/config.yaml" ]

0 commit comments

Comments
 (0)