blob: f09f9a77e801a91cef11ca81363c1d25b2ccf1ad [file] [log] [blame]
FROM idscorpuslinguistics/derekovecs:tmp AS base
RUN rm -rf /derekovecs/example-models
RUN hypnotoad -t script/derekovecs-server || true
# Inline insists on a writable directory even when its cache is up to date, and
# there is no compiler left in the image to rebuild elsewhere. Without this the
# image only runs as root, which is no option when the models come from an NFS
# export with root_squash.
RUN chmod -R a+rwX /derekovecs/_Inline
RUN rm -rf /usr/bin/g++* /usr/include/linux /usr/bin/gcc* /usr/bin/make /usr/lib/gcc /usr/bin/x86_64-alpine-linux*
RUN rm -rf /derekovecs/example-models
FROM scratch AS derekovecs
WORKDIR /derekovecs
COPY --from=base / /
ENV MOJO_CONFIG=/config/derekovecs.conf
EXPOSE 3000
ENTRYPOINT [ "hypnotoad", "-f", "script/derekovecs-server" ]