-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (30 loc) · 1.14 KB
/
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
38
39
40
41
42
43
44
###################################
# multi stage Dockerfile
# 1. build xar archives
# 3. build exist container
###################################
# 1. step
FROM openjdk:8-jdk-stretch as builder
LABEL maintainer="Daniel Röwenstrunk <[email protected]>"
RUN apt-get update && \
apt-get install -y ant ruby
RUN mkdir -p /sencha && \
mkdir -p /xars && \
mkdir -p /edirom && \
curl -o /sencha/cmd.sh.zip http://cdn.sencha.com/cmd/6.6.0.13/no-jre/SenchaCmd-6.6.0.13-linux-amd64.sh.zip
RUN unzip -p /sencha/cmd.sh.zip > /sencha/cmd-install.sh && \
chmod +x /sencha/cmd-install.sh && \
/sencha/cmd-install.sh -Dall=true -q -dir /opt/sencha/Cmd
ENV PATH /opt/sencha/Cmd/:$PATH
WORKDIR /edirom
COPY . .
RUN sh build.sh && \
mv build-xar/*.xar /xars/
# 2. step
FROM stadlerpeter/existdb:latest
LABEL maintainer="Daniel Röwenstrunk <[email protected]>"
ARG DATA_PACKAGE_URL
ENV EXIST_CONTEXT_PATH /
ENV EXIST_DEFAULT_APP_PATH xmldb:exist:///db/apps/EdiromOnline
COPY --chown=wegajetty --from=builder /xars/*.xar /opt/exist/autodeploy/
ADD --chown=wegajetty ${DATA_PACKAGE_URL} /opt/exist/autodeploy/