| Marc Kupietz | a6a5876 | 2024-09-13 17:02:59 +0200 | [diff] [blame] | 1 | FROM idscorpuslinguistics/derekovecs:tmp AS base |
| 2 | |
| 3 | RUN rm -rf /derekovecs/example-models |
| Marc Kupietz | 10ccb98 | 2024-09-12 14:15:13 +0200 | [diff] [blame] | 4 | RUN hypnotoad -t script/derekovecs-server || true |
| Marc Kupietz | c5856d9 | 2026-07-31 11:53:43 +0900 | [diff] [blame] | 5 | # 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. |
| 9 | RUN chmod -R a+rwX /derekovecs/_Inline |
| Marc Kupietz | 10ccb98 | 2024-09-12 14:15:13 +0200 | [diff] [blame] | 10 | RUN rm -rf /usr/bin/g++* /usr/include/linux /usr/bin/gcc* /usr/bin/make /usr/lib/gcc /usr/bin/x86_64-alpine-linux* |
| 11 | RUN rm -rf /derekovecs/example-models |
| Marc Kupietz | a6a5876 | 2024-09-13 17:02:59 +0200 | [diff] [blame] | 12 | |
| 13 | FROM scratch AS derekovecs |
| 14 | WORKDIR /derekovecs |
| 15 | COPY --from=base / / |
| 16 | |
| 17 | ENV MOJO_CONFIG=/config/derekovecs.conf |
| 18 | |
| 19 | EXPOSE 3000 |
| 20 | |
| 21 | ENTRYPOINT [ "hypnotoad", "-f", "script/derekovecs-server" ] |