-
Notifications
You must be signed in to change notification settings - Fork 22
/
Dockerfile
37 lines (27 loc) · 923 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Start from the sbt builder image
FROM mozilla/sbt:8u212_1.2.8
# Add all of MMT
ADD src/ /build/MMT/src
ADD deploy/ /build/MMT/deploy
WORKDIR /build/MMT/src
RUN sbt ++2.13.4 deploy
# Runtime dependencies
FROM openjdk:jre-alpine
RUN apk --no-cache --no-progress add bash git
# Notice that "server on [port]" will not just work inside a docker container
# and "server on [port] 0.0.0.0" should be used instead
VOLUME /content
EXPOSE 8080
# Install MMT into /mmt/
RUN mkdir -p /mmt/deploy
# Add mmt.jar file and legal text
COPY --from=0 /build/MMT/deploy/mmt.jar /mmt/deploy/mmt.jar
ADD COPYING.txt /mmt/
# Add MMT script to PATH
ADD deploy/mmt /mmt/deploy/mmt
ENV PATH="/mmt/deploy:${PATH}"
# Run setup and setup the entry for the future
RUN mmt :setup "/mmt/" "/content/" ":" "--no-content"
ADD scripts/docker/install.msl /install.msl
ADD scripts/docker/entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]