Dockerfile and export image if OUTPUT_DIR
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
22a20a5e28
commit
f5db5f704f
2 changed files with 18 additions and 0 deletions
|
@ -78,5 +78,14 @@ buildah rm ${SRC_CTR}
|
|||
#
|
||||
buildah tag $IMG $SRC_IMAGE
|
||||
|
||||
## if an output directory is provided then save a copy to it
|
||||
## XXX(vbatts) this is not working inside a container like `quay.io/buildah/stable` yet
|
||||
if [ -n "${OUTPUT_DIR}" ] ; then
|
||||
mkdir -p "${OUTPUT_DIR}"
|
||||
skopeo copy containers-storage:"${IMG}" oci:"${OUTPUT_DIR}"/
|
||||
fi
|
||||
|
||||
# Push SRC_IMAGE to Registry
|
||||
# buildah push $SRC_IMAGE REGISTRY_NAME/$SRC_IMAGE
|
||||
|
||||
# vim:set shiftwidth=4 softtabstop=4 expandtab:
|
||||
|
|
9
Dockerfile
Normal file
9
Dockerfile
Normal file
|
@ -0,0 +1,9 @@
|
|||
FROM quay.io/buildah/stable
|
||||
RUN dnf install -y skopeo && \
|
||||
dnf clean all && \
|
||||
mkdir -p /output
|
||||
COPY . /usr/local/bin/
|
||||
VOLUME /var/lib/container
|
||||
VOLUME /output
|
||||
ENV OUTPUT_DIR=/output
|
||||
ENTRYPOINT ["/usr/local/bin/BuildSourceImage.sh"]
|
Loading…
Reference in a new issue