Merge pull request #30 from vbatts/non-root-container

Enable non-root container
This commit is contained in:
Daniel J Walsh 2019-09-19 05:37:20 -04:00 committed by GitHub
commit b77abbafa3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 4 deletions

View file

@ -976,6 +976,10 @@ main() {
_rm_rf "${TMPDIR}"
fi
_mkdir_p "${TMPDIR}"
ret=$?
if [ ${ret} -ne 0 ] ; then
_error "failed to mkdir ${TMP}"
fi
# setup rootfs to be inspected (if any)
rootfs=""

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