summaryrefslogtreecommitdiffstats
path: root/docker/README.md
blob: 7e3966da26575bf139ac8159db197d817cccb773 (plain)
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
# Petitboot Build Container Support

## Command Summary

 - `build-builder` Builds a docker image that contains tools for building petitboot.  Default docker image tag is `pb-builder:${VERSION}${ARCH_TAG}`.
 - `build-pb` Builds the petitboot programs using a pb-builder container.

## Examples

### Build the petitboot programs

    ./build-builder -v
    ./build-pb -vc

### Run petitboot programs in a pb-builder container

    docker run --rm -v $(pwd):/opt/pb -w /opt/pb $(./docker/build-pb -t) ./ui/ncurses/petitboot-nc --help

## Debugging Build Problems

### Run an interactive pb-builder container

As current user:

    docker run --rm -it --user $(id -u):$(id -g) -v /etc/group:/etc/group:ro -v /etc/passwd:/etc/passwd:ro -v $(pwd):/opt/pb -w /opt/pb $(./docker/build-pb -t) bash

As root:

    docker run --rm -it -v /etc/group:/etc/group:ro -v /etc/passwd:/etc/passwd:ro -v $(pwd):/opt/pb -w /opt/pb $(./docker/build-pb -t) bash
OpenPOWER on IntegriCloud