Added Docker support (#40)

* Added Docker support

- replaced necessity for devicemapper (through kpartx) by using parted and
  losetup with offsets
- added Dockerfile
- added dependency for parted and grep
- added hints to README.md
- common: loop through unmounts, fix shellcheck warnings

* stage2: use debconf instead of console-setup patch. Fixes #41
This commit is contained in:
Claus F. Strasburger
2017-01-23 12:44:03 +00:00
committed by XECDesign
parent bc8a74858e
commit 667318116a
11 changed files with 183 additions and 58 deletions
Regular → Executable
+17 -4
View File
@@ -6,7 +6,7 @@ _Tool used to create the raspberrypi.org Raspbian images_
## Dependencies
`quilt kpartx realpath qemu-user-static debootstrap zerofree pxz zip dosfstools bsdtar libcap2-bin`
`quilt parted realpath qemu-user-static debootstrap zerofree pxz zip dosfstools bsdtar libcap2-bin grep rsync`
## Config
@@ -35,10 +35,23 @@ A simple example for building Raspbian:
IMG_NAME='Raspbian'
```
## Docker Build
```bash
vi config # Edit your config file. See above.
./build-docker.sh
```
If everything goes well, your finished image will be in the `deploy/` folder.
You can then remove the build container with `docker rm pigen_work`
If something breaks along the line, you can edit the corresponding scripts, and
continue:
```
CONTINUE=1 ./build-docker.sh
```
## Stage Anatomy
### Raspbian Stage Overview
The build of Raspbian is divided up into several stages for logical clarity
@@ -97,4 +110,4 @@ Then remove the `EXPORT*` files from `./stage4` (if building up to stage 2) or f
# Example for building a lite system
$ touch ./stage3/SKIP ./stage4/SKIP
$ rm stage4/EXPORT*
```
```