forked from coppit/docker-xeoma
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·53 lines (42 loc) · 1.59 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
FROM phusion/baseimage:0.11
MAINTAINER David Coppit <[email protected]>
ENV TERM=xterm-256color
# Use baseimage-docker's init system
CMD ["/sbin/my_init"]
RUN true && \
\
DEBIAN_FRONTEND=noninteractive && \
\
# Speed up APT
echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/02apt-speedup && \
echo "Acquire::http {No-Cache=True;};" > /etc/apt/apt.conf.d/no-cache && \
\
# Install prerequisites
apt-get update && \
apt-get install -qy iproute2 tzdata libasound2 wget && \
\
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
\
# clean up
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
/usr/share/man /usr/share/groff /usr/share/info \
/usr/share/lintian /usr/share/linda /var/cache/man && \
(( find /usr/share/doc -depth -type f ! -name copyright|xargs rm || true )) && \
(( find /usr/share/doc -empty|xargs rmdir || true ))
VOLUME [ "/config", "/archive" ]
EXPOSE 8090
EXPOSE 10090
# Create template config file
COPY xeoma.conf.default /files/
# Set up start up scripts
COPY parse_config_file.sh /etc/my_init.d/30_parse_config_file.sh
COPY 40_install_xeoma.py 50_configure_xeoma.sh /etc/my_init.d/
RUN chmod +x /etc/my_init.d/30_parse_config_file.sh /etc/my_init.d/40_install_xeoma.py /etc/my_init.d/50_configure_xeoma.sh
# Add a cron job for updating Xeoma
COPY update_xeoma.sh /etc/cron.hourly/update_xeoma
RUN chmod +x /etc/cron.hourly/update_xeoma
COPY xeoma.sh /etc/service/xeoma/run
RUN chmod +x /etc/service/xeoma/run
RUN mkdir /archive-cache && \
echo 'This is a placeholder to detect when a host volume is mapped to /archive-cache' > /archive-cache/4vagl0js6k