-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
76 lines (60 loc) · 2.31 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
74
FROM openjdk:8-jre-slim-stretch
# Dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
ruby \
libfreetype6 \
fontconfig \
python2.7 \
abiword \
gnupg gnupg2 gnupg1 \
git \
build-essential \
apache2 \
php php-curl php-json php-xml \
&& rm -rf /var/lib/apt/lists/*
# More dependencies. The version of nodejs and npm in debian is old, so we add the ppa to get a more recent one
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
apt-get update && \
apt-get install -y nodejs
# Installing SenchaCmd
RUN curl --silent https://cdn.sencha.com/cmd/5.1.3.61/SenchaCmd-5.1.3.61-linux-x64.run.zip -o /tmp/sencha.zip && \
unzip /tmp/sencha.zip -d /tmp && \
unlink /tmp/sencha.zip && \
chmod o+x /tmp/SenchaCmd-5.1.3.61-linux-x64.run && \
mkdir /sencha && \
echo -ne '\n\n\n\n\n\ny\n\n' | /tmp/SenchaCmd-5.1.3.61-linux-x64.run --prefix /sencha && \
unlink /tmp/SenchaCmd-5.1.3.61-linux-x64.run
# Download lime server and its dependencies (via npm)
RUN mkdir /limeserver && cd /limeserver && \
git clone --recursive https://github.com/cirsfid-unibo/lime-server.git && \
cd lime-server && \
npm install
# Download lime, lime's sencha workspace, download dependencies via npm and build the app
RUN mkdir /limebuild && cd /limebuild && \
curl -s http://sinatra.cirsfid.unibo.it/demo-akn/lime_ext_workspace.zip -o lime_ext_workspace.zip && \
unzip lime_ext_workspace.zip && \
rm lime_ext_workspace.zip && \
git clone --recursive https://github.com/cirsfid-unibo/lime.git && \
mv lime/* .
RUN cd /limebuild && \
cd scripts && \
npm install && \
cd .. && \
/sencha/Sencha/Cmd/5.1.3.61/sencha app build && \
echo "" > /limebuild/config.json
# Replace /var/www/html with lime
RUN rm -rf /var/www/html && \
ln -s /limebuild /var/www/html
# Copy the docker-entrypoint.sh file that launches apache2 (for lime) and lime server
COPY docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh
# Copy the configuration file for lime server and lime
COPY config.limeserver.json /limeserver/lime-server/documentsdb/config.json
WORKDIR /
#Entrypoint with no parameters
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["", ""]
#Expose both the 80 (that will be accesible as 8008) and the 9006 ports. 80 is used by apache to serve lime, 9006 is used to serve lime server.
EXPOSE 80
EXPOSE 9006