forked from ArchiveTeam/warrior-dockerfile
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.raspberry
96 lines (85 loc) · 2.1 KB
/
Dockerfile.raspberry
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Dockerfile for Raspberry Pi 2 and 3
FROM arm32v5/debian:sid-slim
LABEL version="1.0.0" \
description="ArchiveTeam Warrior container for Raspberry Pi arm32"
# Install dependencies
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
curl \
git \
net-tools \
libgnutls30 \
liblua5.1-0 \
python \
python-pip \
python-setuptools \
python-wheel \
python3 \
python3-pip \
python3-setuptools \
python3-wheel \
sudo \
wget \
rsync \
&& useradd -d /home/warrior -m -U warrior \
&& echo "warrior ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers \
&& mkdir -p /data/data \
&& chown -R warrior:warrior /data/data
RUN apt-get install -y --no-install-recommends \
autoconf \
build-essential \
flex \
libgnutls28-dev \
libidn2-0-dev \
uuid-dev \
libpsl-dev \
libpcre2-dev \
liblua5.1-0-dev \
zlib1g-dev
WORKDIR /tmp
RUN curl -o wget-1.14.lua.LATEST.tar.bz2 \
https://warriorhq.archiveteam.org/downloads/wget-lua/wget-1.14.lua.LATEST.tar.bz2 \
&& tar -jxf /tmp/wget-1.14.lua.LATEST.tar.bz2 \
--strip-components=1
RUN ./configure --with-ssl=gnutls --disable-nls \
&& make \
&& cp src/wget /usr/bin/wget-lua \
&& chmod a+x /usr/bin/wget-lua
RUN apt-get remove -y --purge \
autoconf \
curl \
build-essential \
flex \
libgnutls28-dev \
libidn2-0-dev \
uuid-dev \
libpsl-dev \
libpcre2-dev \
liblua5.1-0-dev \
zlib1g-dev \
&& apt-get clean -y \
&& apt-get autoremove -y --purge \
&& rm -r /var/lib/apt/lists/* \
&& rm -r /tmp/*
RUN pip install requests \
&& pip install six \
&& pip install warc \
&& pip3 install requests \
&& pip3 install six \
&& pip3 install warc
RUN pip3 install seesaw
WORKDIR /home/warrior
USER warrior
RUN mkdir /home/warrior/projects
# Expose the persistent data to the host. This will allow the user
# to not have to reconfigure the container across runs.
VOLUME /data/data
VOLUME /home/warrior/projects/config.json
# Expose web interface port
EXPOSE 8001
ENTRYPOINT ["run-warrior3", \
"--projects-dir", "/home/warrior/projects", \
"--data-dir", "/data/data", \
"--warrior-hq", "http://warriorhq.archiveteam.org", \
"--port", "8001", \
"--real-shutdown"]