[r27]: / trunk / wharfie / qemu / Wharfile  Maximize  Restore  History

Download this file

59 lines (52 with data), 2.7 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Copyright 2018 Ingo Hornberger <ingo_@gmx.net>
#
# This software is licensed under the MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this
# software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify,
# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to the following
# conditions:
#
# The above copyright notice and this permission notice shall be included in all copies
# or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
# OR OTHER DEALINGS IN THE SOFTWARE.
#
################################################################################
#
# This Wharfile builds a Qemu image which is able to build any Wharfile w/o
# special dependencies on the host. The goal is, that we can build on linux
# as an ordinary user (w/o root priviledges) and that we are at all able to
# build on windows.
#
# Why should one build an embedded root filesystem under windows?
#
# You should ask this question half of the Raspberry Pi users. They all want
# to build special images (With Game Emulators, as a NAS, as a media server, ...),
# but only few of them have a linux system at home to do this. So they are
# usually configuring everything live on their Pi. Which is fun, but:
# - messy
# - not reproducable
# - critical in legal terms
# - an anoying task when parts of the system need to be updated
#
################################################################################

FROM debian_amd64_jessie

RUN apt-get install -y sudo make binfmt-support qemu-user-static debootstrap kpartx tar bzip2 systemd-sysv net-tools isc-dhcp-client linux-image-amd64 wamerican psmisc

# Add user 'wharfie' with password 'wharfie' for interactive login
RUN useradd -ms /bin/bash wharfie; \
    echo "wharfie:wharfie" | chpasswd; \
    echo "root:root" | chpasswd;

ADD files/wharfie.service /etc/systemd/system/wharfie.service
ADD files/qemu_autorun.sh /usr/local/wharfie/qemu_autorun.sh
RUN systemctl enable wharfie.service; \
    systemctl set-default multi-user.target;

RUN HOST cp -pR boot ../

RUN HOST ../qcow.sh ../qwharfie.qcow