-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.data
43 lines (29 loc) · 1.06 KB
/
Dockerfile.data
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
FROM jetty:11.0.15-jre11
USER root
# TODO we could compile the service here so this works standalone
# install cron
RUN apt-get -qq -y update && \
apt-get -qq -y install cron
# Working Directory
WORKDIR /home/incore
# Copy service war
COPY server/data-service/build/libs/data-service.war /home/incore/lib/
# Copy service context to jetty webapps
COPY docker/data.xml /var/lib/jetty/webapps/
# cron job
COPY clear_cache.sh /home/incore/clear_cache.sh
COPY clear_cache_cron /home/incore/clear_cache_cron
# Give execution rights on the cron job
RUN chmod 0644 /home/incore/clear_cache_cron
# Apply cron job
RUN crontab /home/incore/clear_cache_cron
# Create the log file
RUN touch /var/log/clear_cache_cron.log
RUN chmod go+w /var/log/clear_cache_cron.log
# create data directory mounting point
RUN mkdir /home/incore/data && mkdir /home/incore/data/incore_data
# Reset WORKDIR so jetty runs correctly
WORKDIR /var/lib/jetty
ENV JETTY_PORT 8080
EXPOSE 8080
CMD ["sh", "-c", "cron && java -Djava.io.tmpdir=/home/incore/ -jar /usr/local/jetty/start.jar jetty.http.port=8888"]