blob: f09f9a77e801a91cef11ca81363c1d25b2ccf1ad [file] [log] [blame]
Marc Kupietza6a58762024-09-13 17:02:59 +02001FROM idscorpuslinguistics/derekovecs:tmp AS base
2
3RUN rm -rf /derekovecs/example-models
Marc Kupietz10ccb982024-09-12 14:15:13 +02004RUN hypnotoad -t script/derekovecs-server || true
Marc Kupietzc5856d92026-07-31 11:53:43 +09005# Inline insists on a writable directory even when its cache is up to date, and
6# there is no compiler left in the image to rebuild elsewhere. Without this the
7# image only runs as root, which is no option when the models come from an NFS
8# export with root_squash.
9RUN chmod -R a+rwX /derekovecs/_Inline
Marc Kupietz10ccb982024-09-12 14:15:13 +020010RUN rm -rf /usr/bin/g++* /usr/include/linux /usr/bin/gcc* /usr/bin/make /usr/lib/gcc /usr/bin/x86_64-alpine-linux*
11RUN rm -rf /derekovecs/example-models
Marc Kupietza6a58762024-09-13 17:02:59 +020012
13FROM scratch AS derekovecs
14WORKDIR /derekovecs
15COPY --from=base / /
16
17ENV MOJO_CONFIG=/config/derekovecs.conf
18
19EXPOSE 3000
20
21ENTRYPOINT [ "hypnotoad", "-f", "script/derekovecs-server" ]