-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
26 lines (22 loc) · 975 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
# Build the webui
FROM java as builder
# Uncomment the following during development to reduce build time
#RUN apt install git && \
# cd /tmp && git clone https://github.com/daisy/pipeline-webui && \
# cd /tmp/pipeline-webui && ./activator publish-local
ADD . /usr/src/webui
WORKDIR /usr/src/webui
# use the sbt docker plugin to create the artifacts
# (http://www.scala-sbt.org/sbt-native-packager/formats/docker.html)
RUN ./activator clean docker:stage
# the webui expects the db under data/db
WORKDIR /usr/src/webui/target/docker/stage/opt/docker
RUN mkdir data && mv db-empty data/db
# then use the build artifacts to create an image where the pipeline is installed
FROM openjdk:8-jre
LABEL maintainer="DAISY Consortium (http://www.daisy.org/)"
COPY --from=builder /usr/src/webui/target/docker/stage/opt/docker /opt/daisy-pipeline2-webui/.
RUN mkdir /run/daisy-pipeline2-webui
EXPOSE 9000 9443
ENTRYPOINT ["/opt/daisy-pipeline2-webui/bin/pipeline2-webui"]
CMD []