--- a +++ b/trunk/wharfie/qemu/Wharfile @@ -0,0 +1,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