*: default the container to /tmp basedir for non-root

and adding an example to the README showing to run as non-root inside
the container as well.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2019-09-19 05:23:40 -04:00
parent a8df221421
commit a863652505
Signed by: vbatts
GPG key ID: 10937E57733F1362
2 changed files with 6 additions and 4 deletions

View file

@ -8,4 +8,4 @@ RUN mkdir -p /output
ENV OUTPUT_DIR=/output
VOLUME /output
ENTRYPOINT ["/usr/local/bin/BuildSourceImage.sh"]
ENTRYPOINT ["/usr/local/bin/BuildSourceImage.sh", "-b", "/tmp/"]

View file

@ -28,9 +28,12 @@ Usage: BuildSourceImage.sh [-D] [-b <path>] [-c <path>] [-e <path>] [-r <path>]
```
It also nicely usable inside a container
Nicely usable inside a container:
```bash
$> buildah build-using-dockerfile -t containers/buildsourceimage .
$> podman build -t containers/buildsourceimage .
$> mkdir ./output/
$> podman run -it -v $(pwd)/output/:/output/ -v $(pwd)/SRCRPMS/:/data/ -u $(id -u) containers/buildsourceimage -s /data/
```
## Examples
@ -45,4 +48,3 @@ $> buildah build-using-dockerfile -t containers/buildsourceimage .
* Build a source code image from a collection of known `.src.rpm`'s
* Include additional build context into the source image
* Include extra sources use