forked from minostauros/duc-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·48 lines (41 loc) · 1.3 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
FROM ubuntu:24.04
LABEL maintainer="efreeze"
# Set correct environment variables
ENV HOME /duc
# Install Dependencies
RUN apt-get update -qq && \
apt-get install -qq wget apache2 libncursesw5-dev libcairo2-dev libpango1.0-dev build-essential libtokyocabinet-dev && \
apt-get autoremove && \
apt-get autoclean && \
rm -rf /var/lib/apt/lists/*
# Install duc
# /duc/db is a directory to mount multiple DBs, for server. duc_startup.sh look into this directory and create CGIs
RUN mkdir /duc && \
mkdir /duc/db && \
cd /duc && \
wget https://github.com/zevv/duc/releases/download/1.4.5/duc-1.4.5.tar.gz && \
tar xzf duc-1.4.5.tar.gz && \
rm duc-1.4.5.tar.gz && \
cd duc-1.4.5 && \
./configure && \
make && \
make install && \
cd .. && \
rm -rf duc-1.4.5
COPY assets/index.cgi /var/www/duc/
COPY assets/000-default.conf /etc/apache2/sites-available/
COPY assets/ducrc /etc/
COPY assets/duc_startup.sh /duc/
#create a starter database so that we can set permissions for cgi access
RUN mkdir /host && \
duc index /host/ && \
chmod 777 /duc/ && \
chmod 777 /duc/.duc.db && \
a2enmod cgi && \
chmod +x /duc/duc_startup.sh && \
chmod +x /var/www/duc/index.cgi
ENV DUC_CGI_OPTIONS --list --tooltip --dpi=120
VOLUME /host /duc/db
EXPOSE 80
WORKDIR /duc
CMD /duc/duc_startup.sh