forked from sourcegraph/zoekt
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.webserver
24 lines (18 loc) · 981 Bytes
/
Dockerfile.webserver
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM alpine:3.19
RUN apk add --no-cache ca-certificates bind-tools tini
# Run as non-root user sourcegraph. External volumes should be mounted under /data (which will be owned by sourcegraph).
# RUN mkdir -p /home/sourcegraph
# RUN addgroup -S sourcegraph && adduser -S -G sourcegraph -h /home/sourcegraph sourcegraph && mkdir -p /data && chown -R sourcegraph:sourcegraph /data
# USER sourcegraph
# WORKDIR /home/sourcegraph
# ENV DATA_DIR /data/index
# RUN mkdir -p ${DATA_DIR}
# We copy from the locally built zoekt image
COPY --from=zoekt /usr/local/bin/zoekt-webserver /usr/local/bin/
# zoekt-webserver has a large stable heap size (10s of gigs), and as such the
# default GOGC=100 could be better tuned. https://dave.cheney.net/tag/gogc
# In go1.18 the GC changed significantly and from experimentation we tuned it
# down from 50 to 25.
ENV GOGC=25
ENTRYPOINT ["/sbin/tini", "--", "zoekt-webserver"]
# CMD zoekt-webserver -index $DATA_DIR -pprof -rpc -indexserver_proxy