forked from openequella/openEQUELLA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
73 lines (52 loc) · 2.05 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
FROM openjdk:8-jdk as baseequella
# Install needed tools to install and run openEQUELLA
# Clean up the apt cache afterwards.
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
RUN \
apt-get update \
&& apt-get install -y \
curl \
imagemagick \
libav-tools \
unzip \
&& rm -rf /var/lib/apt/lists/*
FROM baseequella as installer
# Install openEQUELLA
ARG OEQ_INSTALL_FILE=equella-installer-6.7.zip
ARG OEQ_INSTALL_ZIP_ROOT_DIR=equella-installer-6.7
COPY ["$OEQ_INSTALL_FILE","defaults.xml", "./"]
RUN unzip $OEQ_INSTALL_FILE \
&& mv $OEQ_INSTALL_ZIP_ROOT_DIR /equella-installer \
&& java -jar /equella-installer/enterprise-install.jar --unsupported defaults.xml
FROM baseequella as equella
RUN useradd -ms /bin/bash equella
WORKDIR /home/equella
COPY --from=installer /home/equella/equella equella
RUN mkdir -p /home/equella/equella/filestore/ \
&& mkdir -p /home/equella/equella/freetext/ \
&& chown -R equella:equella equella
WORKDIR /home/equella/equella
USER equella
VOLUME ["/home/equella/equella/filestore/", "/home/equella/equella/freetext/"]
COPY learningedge-log4j.properties learningedge-config/
# At this point openEQUELLA is installed.
EXPOSE 8080
ARG MEM=512
ARG JVM_ARGS
ENV MEM $MEM
ENV JVM_ARGS $JVM_ARGS
# Properties in the optional-config, mandatory-config, and hibernate files can be
# overridden by oEQ logic via environment variables by changing '.' to '_',
# uppercasing, and prepending "EQ_" to the name.
ARG EQ_HTTP_PORT=8080
ENV EQ_HTTP_PORT $EQ_HTTP_PORT
ARG EQ_ADMIN_URL=http://localhost:8080/admin/
ENV EQ_ADMIN_URL $EQ_ADMIN_URL
ARG EQ_HIBERNATE_CONNECTION_URL=jdbc:postgresql://localhost:5432/equella
ENV EQ_HIBERNATE_CONNECTION_URL $EQ_HIBERNATE_CONNECTION_URL
ARG EQ_HIBERNATE_CONNECTION_USERNAME=equellauser
ENV EQ_HIBERNATE_CONNECTION_USERNAME $EQ_HIBERNATE_CONNECTION_USERNAME
ARG EQ_HIBERNATE_CONNECTION_PASSWORD=password
ENV EQ_HIBERNATE_CONNECTION_PASSWORD $EQ_HIBERNATE_CONNECTION_PASSWORD
CMD java -Xmx${MEM}m $JVM_ARGS -cp learningedge-config:server/equella-server.jar com.tle.core.equella.runner.EQUELLAServer