diff --git a/Dockerfile b/Dockerfile index 377556d..197a21a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,23 +37,10 @@ RUN CGO_ENABLED=0 go build -trimpath -o /out/build-dictionary ./cmd/build-dictio # --- the dictionary --------------------------------------------------------- FROM alpine:3 AS dict -# Set to 1 to build from the checked-in word sample instead of the corpus. -# That produces a playable but tiny dictionary, and exists so the image can be -# smoke-tested against the same words the browser suite plays. -ARG FIXTURE_DICT=0 - WORKDIR /work COPY --from=build /out/build-dictionary /usr/local/bin/build-dictionary -COPY testdata/fixture-words.txt ./fixture-words.txt COPY data/dictionary.txt ./dictionary.txt - -RUN set -eu; \ - mkdir -p /out; \ - if [ "$FIXTURE_DICT" = "1" ]; then \ - build-dictionary --words ./fixture-words.txt --out /out/noitu.db --min-words 150; \ - else \ - build-dictionary --corpus ./dictionary.txt --out /out/noitu.db; \ - fi +RUN mkdir -p /out && build-dictionary --corpus ./dictionary.txt --out /out/noitu.db # --- the image -------------------------------------------------------------- FROM gcr.io/distroless/static-debian12:nonroot diff --git a/docs/deployment.md b/docs/deployment.md index 042774d..c8619aa 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -65,10 +65,6 @@ database the game uses in a builder stage, so it downloads nothing from Wikimedia. Only the database is copied into the final image. The result is a distroless image of about 25 MB running as a non-root user. -Passing `--build-arg FIXTURE_DICT=1` builds the same image against the -checked-in word sample instead. It produces a playable but tiny dictionary; -do not ship it. - ### Version `GET /version` answers with the build's version, and the same string opens