forked from ArchiveTeam/warrior-dockerfile
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.raspberry
More file actions
42 lines (30 loc) · 1.27 KB
/
Dockerfile.raspberry
File metadata and controls
42 lines (30 loc) · 1.27 KB
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
# Dockerfile for Raspberry Pi 2 and 3
# Use armv7/armhf-baseimage as base image.
FROM armv7/armhf-baseimage
# Set environment variables.
ENV HOME /root
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
# Install dependencies
RUN apt-get update
RUN apt-get install -y python-pip git sudo net-tools isc-dhcp-client python-software-properties wget liblua5.1-0 python-dev
# Add wget-lua binary compiled for ARM
ADD wget-lua.raspberry /usr/bin/wget-lua
# Fix dnsmasq bug (see https://github.com/nicolasff/docker-cassandra/issues/8#issuecomment-36922132)
RUN echo 'user=root' >> /etc/dnsmasq.conf
# Setup system for the warrior
RUN useradd warrior
RUN echo "warrior ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN mkdir /home/warrior && chown warrior: /home/warrior
# Clone warrior code
RUN (cd /home/warrior && sudo -u warrior git clone -b docker https://github.com/ArchiveTeam/warrior-code2.git)
# Add the boot script (this will install the actual warrior on boot)
RUN mkdir -p /etc/my_init.d
ADD boot.sh /etc/my_init.d/warrior-boot.sh
# Expose web interface port
EXPOSE 8001
# Add the warrior service entry for runit
RUN mkdir /etc/service/warrior
ADD warrior.sh /etc/service/warrior/run
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*