From a8636525053b8339a73e1caa1cc9e84a7adc9bd0 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Thu, 19 Sep 2019 05:23:40 -0400 Subject: [PATCH] *: 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 --- Dockerfile | 2 +- README.md | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index d6a4727..a50044c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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/"] diff --git a/README.md b/README.md index b566eae..b3b7b7c 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,12 @@ Usage: BuildSourceImage.sh [-D] [-b ] [-c ] [-e ] [-r ] ``` -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 -