forked from spec-rgdevops/docker-SPECjEnterprise2010
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile_server
28 lines (19 loc) · 1.49 KB
/
Dockerfile_server
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
FROM specj_base
RUN sed -i "s#<class>org.spec.jent.ejb.orders.entity.OrderLinePK</class>#<class>org.spec.jent.ejb.orders.entity.OrderLinePK</class>\n <shared-cache-mode>NONE</shared-cache-mode>\n <properties>\n <property name=\"eclipselink.query-results-cache\" value=\"false\"/>\n <property name=\"eclipselink.cache.shared.default\" value=\"false\"/>\n <property name=\"eclipselink.refresh\" value=\"true\"/>\n </properties>#g" /SPECjEnterprise2010-1.03/src/resources/ejb/META-INF/persistence.xml
ADD specdb.zip /tmp
RUN unzip /tmp/specdb.zip -d / && rm /tmp/specdb.zip
ADD SPECjEnterprise2010_OrdersDomainOnlyPatch.zip /tmp/
RUN cd tmp && unzip -j /tmp/SPECjEnterprise2010_OrdersDomainOnlyPatch.zip && \
mv /tmp/OrderSession.java /SPECjEnterprise2010-1.03/src/java/ejb/org/spec/jent/ejb/orders/session && \
mv /tmp/PurchaseOrderMDB.java /SPECjEnterprise2010-1.03/src/java/ejb/org/spec/jent/ejb/supplier/mdb && \
rm /tmp/SPECjEnterprise2010_OrdersDomainOnlyPatch.zip
#ADD eclipselink_persistence.xml /SPECjEnterprise2010-1.03/src/resources/ejb/META-INF/persistence.xml
#patch: add beans.xml to avoid NullPointerExceptions
#see http://stackoverflow.com/questions/26822225/glassfish-4-1-bug-session-invalidate-nullpointer-exception
ADD beans.xml /SPECjEnterprise2010-1.03/src/web-docroot/WEB-INF/beans.xml
RUN cd /SPECjEnterprise2010-1.03 && \
ant install && \
ant specj.ear.withcompile
EXPOSE 4848 8080 8181
ADD start_server.sh /
CMD ["/bin/bash", "/start_server.sh"]