fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

all: remove curl (#401)

We only have curl for debugging. We can just use wget which comes with
busybox. Additionally bump alpine patch version to latest.

Test Plan: ran wget manually to ensure it works. Also built both images
locally and had clean scans from snyk.

docker build -t zoekt .
docker scan zoekt
docker build -t zoekt-indexserver . -f Dockerfile.indexserver
docker scan zoekt-indexserver
docker build -t zoekt-webserver . -f Dockerfile.webserver
docker scan zoekt-webserver

+13 -14
+2 -2
Dockerfile
··· 13 13 ARG VERSION 14 14 RUN go install -ldflags "-X github.com/google/zoekt.Version=$VERSION" ./cmd/... 15 15 16 - FROM alpine:3.15.0 AS zoekt 16 + FROM alpine:3.15.4 AS zoekt 17 17 18 18 RUN apk update --no-cache && apk upgrade --no-cache && \ 19 - apk add --no-cache git ca-certificates bind-tools tini jansson curl 19 + apk add --no-cache git ca-certificates bind-tools tini jansson 20 20 21 21 COPY install-ctags-alpine.sh . 22 22 RUN ./install-ctags-alpine.sh && rm install-ctags-alpine.sh
+2 -2
Dockerfile.indexserver
··· 1 - FROM alpine:3.15.0 1 + FROM alpine:3.15.4 2 2 3 3 RUN apk update --no-cache && apk upgrade --no-cache && \ 4 - apk add --no-cache ca-certificates bind-tools tini git jansson curl && \ 4 + apk add --no-cache ca-certificates bind-tools tini git jansson && \ 5 5 apk add --upgrade --no-cache 'libcrypto1.1>=1.1.1n-r0' 'libssl1.1>=1.1.1n-r0' 'pcre2>=10.40-r0' 6 6 7 7 # Run as non-root user sourcegraph. External volumes should be mounted under /data (which will be owned by sourcegraph).
+2 -3
Dockerfile.webserver
··· 1 - FROM alpine:3.15.0 1 + FROM alpine:3.15.4 2 2 3 3 RUN apk update --no-cache && apk upgrade --no-cache && \ 4 - apk add --no-cache ca-certificates bind-tools tini curl && \ 5 - apk add --upgrade --no-cache 'libcrypto1.1>=1.1.1n-r0' 'libssl1.1>=1.1.1n-r0' 4 + apk add --no-cache ca-certificates bind-tools tini 6 5 7 6 # Run as non-root user sourcegraph. External volumes should be mounted under /data (which will be owned by sourcegraph). 8 7 RUN mkdir -p /home/sourcegraph
+7 -7
cmd/zoekt-sourcegraph-indexserver/debug.go
··· 79 79 Name: "debug", 80 80 ShortUsage: "debug <subcommand>", 81 81 ShortHelp: "a set of commands for debugging and testing", 82 - LongHelp: `CURL 82 + LongHelp: ` 83 83 Zoekt-sourcegraph-indexserver exposes debug information on the /debug landing page. 84 - You can use the following curl commands to access this information from the command line. 84 + You can use the following wget commands to access this information from the command line. 85 85 86 - curl http://localhost:6072/debug/indexed 86 + wget -q -O - http://localhost:6072/debug/indexed 87 87 list the repositories that are INDEXED by this instance. 88 88 89 - curl http://localhost:6072/debug/list[?indexed=TRUE/false] 89 + wget -q -O - http://localhost:6072/debug/list[?indexed=TRUE/false] 90 90 list the repositories that are OWNED by this instance. If indexed=true (default), the list may contain repositories 91 91 that this instance holds temporarily, for example during rebalancing. 92 92 93 - curl http://localhost:6072/debug/merge 93 + wget -q -O - http://localhost:6072/debug/merge 94 94 start a full merge operation in the index directory. You can check the status with 95 - "curl http://localhost:6072/metrics -sS | grep index_shard_merging_running". It is only possible 95 + "wget -q -O - http://localhost:6072/metrics -sS | grep index_shard_merging_running". It is only possible 96 96 to trigger one merge operation at a time. 97 97 98 - curl http://localhost:6072/debug/queue 98 + wget -q -O - http://localhost:6072/debug/queue 99 99 list the repositories in the indexing queue, sorted by descending priority. 100 100 101 101 COLUMN HEADERS