-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description of changes *Summarize the changes made by this PR.* - Improvements & Bug fixes - Tighten up dockerfiles and tiltfile: Get rid of Alpine linux, make dockerfiles a little friendlier to cache and make the final images smaller, and tell tilt only to reload some of the dockerfiles on certain path reloads. ## Test plan *How are these changes tested?* - [ ] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Documentation Changes *Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the [docs repository](https://github.com/chroma-core/docs)?*
- Loading branch information
Showing
3 changed files
with
18 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,19 @@ | ||
FROM golang:1.20-alpine3.18 as build | ||
WORKDIR /src/chroma-coordinator | ||
RUN apk add --no-cache make git build-base bash | ||
FROM golang:bookworm as builder | ||
WORKDIR /build-dir | ||
RUN apt-get update && apt-get install -y make git bash | ||
|
||
ADD ./go/go.mod ./go.mod | ||
ADD ./go/go.sum ./go.sum | ||
ENV PATH=$PATH:/go/bin | ||
RUN go mod download | ||
|
||
ADD ./go/ ./ | ||
ENV GOCACHE=/root/.cache/go-build | ||
RUN --mount=type=cache,target="/root/.cache/go-build" make | ||
|
||
FROM alpine:3.17.3 | ||
FROM debian:bookworm-slim | ||
|
||
RUN apk add --no-cache bash bash-completion findutils | ||
|
||
# As of 6 Dec 2023, the atlas package isn't in Alpine's main package manager, only | ||
# testing. So we have to add the testing repository to get it. | ||
RUN apk add \ | ||
--no-cache \ | ||
--repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ | ||
--repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ | ||
atlas | ||
|
||
RUN mkdir /chroma-coordinator | ||
WORKDIR /chroma-coordinator | ||
|
||
COPY --from=build /src/chroma-coordinator/bin/coordinator /chroma-coordinator/bin/coordinator | ||
COPY --from=build /src/chroma-coordinator/bin/logservice /chroma-coordinator/bin/logservice | ||
ENV PATH=$PATH:/chroma-coordinator/bin | ||
COPY --from=builder /build-dir/bin/coordinator . | ||
COPY --from=builder /build-dir/bin/logservice . | ||
ENV PATH=$PATH:./ | ||
|
||
CMD /bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters