-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (36 loc) · 1.52 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
FROM phusion/baseimage:latest
MAINTAINER chvb
ENV DEBIAN_FRONTEND noninteractive
#Disable the SSH server
RUN rm -rf /etc/service/sshd /etc/my_init.d/00_regen_ssh_host_keys.sh
# Set correct environment variables.
ENV HOME /root
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
#Change uid & gid to match Unraid
RUN usermod -u 99 nobody && \
usermod -g 100 nobody
RUN apt-add-repository multiverse && \
apt-get update -qq && \
apt-get install -qy mono-complete sudo unzip wget nano
#Download and extract WG++ to correct paths
RUN mkdir /webgrab && \
wget -O /tmp/webgrab.tar.gz http://www.webgrabplus.com/sites/default/files/download/SW/V2.1.0/WebGrabPlus_V2.1_install.tar.gz && \
wget -O /tmp/siteini.zip http://webgrabplus.com/sites/default/files/download/ini/SiteIniPack_current.zip && \
tar --strip-components=1 -xvf /tmp/webgrab.tar.gz -C /webgrab && \
rm -rf /webgrab/siteini.pack && \
unzip -o -d /webgrab /tmp/siteini.zip && \
rm -f /tmp/webgrab.tar.gz /tmp/siteini.zip && \
cd /webgrab && \
./install.sh && \
rm -f /webgrab/WebGrab++.config.xml /webgrab/WebGrab++.config.example.xml
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
#Add scripts & config
ADD ./assets/startup.sh ./assets/mycron ./assets/WebGrab++.config.xml /webgrab/assets/
RUN chmod -R +x /webgrab/ && \
crontab -u nobody /webgrab/assets/mycron && \
mkdir -p /etc/my_init.d && \
cp /webgrab/assets/startup.sh /etc/my_init.d/
VOLUME /config \
/data