mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-09 18:12:55 +01:00
This reduces the image size from around 2.2GB down to 100MB. This is to, hopefully, reduce issues we're seeing where our pipelines are running out of disk space.
26 lines
749 B
Docker
26 lines
749 B
Docker
FROM golang:1.20.0-alpine3.17 as build
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
RUN apk add git
|
|
|
|
ENV ZOEKT_VERSION=c08faec66fc26a41007b2176fbea86c52b0efe4b
|
|
|
|
RUN apk add go && \
|
|
go install github.com/sourcegraph/zoekt/cmd/zoekt-webserver@$ZOEKT_VERSION && \
|
|
go install github.com/sourcegraph/zoekt/cmd/zoekt-git-clone@$ZOEKT_VERSION && \
|
|
go install github.com/sourcegraph/zoekt/cmd/zoekt-git-index@$ZOEKT_VERSION && \
|
|
go install github.com/sourcegraph/zoekt/cmd/zoekt-dynamic-indexserver@$ZOEKT_VERSION && \
|
|
rm -rf /go/pkg /go/src /usr/local/go
|
|
|
|
FROM alpine:3.17 as main
|
|
RUN apk add git
|
|
|
|
COPY --from=build /go/bin/* /usr/bin/
|
|
|
|
COPY assets/zoekt-ci-image/run-zoekt-servers run-zoekt-servers
|
|
|
|
EXPOSE 6060
|
|
EXPOSE 6070
|
|
|
|
CMD ["sh", "run-zoekt-servers"]
|