@@ -18,7 +18,18 @@ RUN git clone https://github.com/factor/factor.git && \
1818 cd factor && \
1919 git checkout ${FACTOR_COMMIT}
2020WORKDIR /opt/factor
21- RUN ./build.sh update
21+
22+ # Bootstrap a headless image: drop the GUI (ui, ui.tools), the in-image help
23+ # system (help, handbook), and the dev-tools component (tools) from the bootstrap
24+ # component set.
25+ ARG FACTOR_EXCLUDE="ui ui.tools help handbook tools"
26+ RUN sed -i 's#-i="\$ BOOT_IMAGE"#-i="$BOOT_IMAGE" -exclude="' "${FACTOR_EXCLUDE}" '"#' build.sh
27+
28+ # build the pinned commit with no git pull.
29+ RUN ./build.sh net-bootstrap
30+
31+ # Precompile tools.test AND the common exercise vocabs into factor.image, then re-save it.
32+ RUN ./factor -e='USING: accessors arrays ascii assocs calendar calendar.english combinators combinators.short-circuit command-line concurrency.combinators concurrency.locks continuations debugger deques destructors dlists formatting fry generic grouping hash-sets hashtables io io.encodings.utf8 io.files io.streams.string kernel lexer locals macros make math math.bitwise math.combinatorics math.constants math.functions math.order math.parser math.primes math.statistics namespaces prettyprint.config quotations random random.mersenne-twister ranges regexp sequences sets sorting source-files.errors.debugger splitting splitting.monotonic strings system tools.test typed unicode vectors vocabs vocabs.loader memory ; save'
2233
2334# Remove files not needed at runtime
2435RUN rm -rf .git build vm src misc Factor.app \
@@ -52,7 +63,7 @@ RUN rm -rf .git build vm src misc Factor.app \
5263# porter-stemmer, regexp, simple-tokenizer, tr, wrap
5364# - Editor / interactive only: documents, inspector, listener, see, xdg
5465# - Other unused: xmode (syntax highlighting), game, farkup (markup),
55- # calendar, colors, delegate, escape-strings, etc-hosts, eval, interpolate,
66+ # colors, delegate, escape-strings, etc-hosts, eval, interpolate,
5667# ip-parser, logging, memoize, method-chains, mirrors, models, nmake, ntp,
5768# protocols, quoting, refs, retries, roman, simple-flat-file, system-info,
5869# timers, typed, uuid, validators
@@ -76,11 +87,11 @@ RUN cd basis && rm -rf \
7687 unrolled-lists vlists \
7788 globs lcs match peg porter-stemmer regexp simple-tokenizer tr wrap \
7889 documents inspector listener see xdg \
79- calendar colors delegate escape-strings etc-hosts eval interpolate \
90+ colors delegate escape-strings etc-hosts eval interpolate \
8091 ip-parser logging memoize method-chains mirrors models nmake ntp \
8192 protocols quoting refs retries roman simple-flat-file system-info \
8293 timers typed uuid validators \
83- bootstrap environment persistent random
94+ bootstrap environment persistent
8495
8596# Asian and rare encodings: only utf8 / latin1 / strict are kept (everything
8697# bundled streams use). 8-bit is the multi-codepage non-utf umbrella.
0 commit comments