Vendor in latest github.com/projectatomic/buildah

This adds support for Dockerfile.in and fixes some limits
issues on docker build

Also adds support for podman build to read Dockerfile from stdin.

cat Dockerfile | podman build -f - .

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1209
Approved by: mheon
This commit is contained in:
Daniel J Walsh
2018-08-03 07:27:33 -04:00
committed by Atomic Bot
parent a83f54e9c7
commit 7462ebe830
27 changed files with 2156 additions and 60 deletions

View File

@ -16,9 +16,9 @@
HOME=`pwd`
########
# test "build-from-scratch"
########
echo ########################################################
echo test "build-from-scratch"
echo ########################################################
TARGET=scratch-image
podman build -q=True -t $TARGET $HOME/test/build/from-scratch
CID=$(buildah from $TARGET)
@ -33,9 +33,9 @@ HOME=`pwd`
podman images -q
########
# test "build-preserve-subvolumes"
########
echo ########################################################
echo test "build-preserve-subvolumes"
echo ########################################################
TARGET=volume-image
podman build -t $TARGET $HOME/test/build/preserve-volumes
CID=$(buildah from $TARGET)
@ -50,9 +50,9 @@ HOME=`pwd`
podman rmi $(buildah --debug=false images -q)
buildah --debug=false images -q
########
# test "build-git-context"
########
echo ########################################################
echo test "build-git-context"
echo ########################################################
TARGET=giturl-image
# Any repo should do, but this one is small and is FROM: scratch.
GITREPO=git://github.com/projectatomic/nulecule-library
@ -63,9 +63,9 @@ HOME=`pwd`
podman images -q
########
# test "build-github-context"
########
echo ########################################################
echo test "build-github-context"
echo ########################################################
TARGET=github-image
# Any repo should do, but this one is small and is FROM: scratch.
GITREPO=github.com/projectatomic/nulecule-library
@ -77,9 +77,9 @@ HOME=`pwd`
podman images -q
########
# test "build-additional-tags"
########
echo ########################################################
echo test "build-additional-tags"
echo ########################################################
TARGET=scratch-image
TARGET2=another-scratch-image
TARGET3=so-many-scratch-images
@ -95,9 +95,9 @@ HOME=`pwd`
podman images -q
########
# test "build-volume-perms"
########
echo ########################################################
echo test "build-volume-perms"
echo ########################################################
TARGET=volume-image
podman build -t $TARGET $HOME/test/build/volume-perms
CID=$(buildah from $TARGET)
@ -110,9 +110,9 @@ HOME=`pwd`
podman images -q
########
# test "build-from-glob"
########
echo ########################################################
echo test "build-from-glob"
echo ########################################################
TARGET=alpine-image
podman build -t $TARGET -file Dockerfile2.glob $HOME/test/build/from-multiple-files
CID=$(buildah from $TARGET)
@ -124,9 +124,9 @@ HOME=`pwd`
podman images -q
########
# test "build-from-multiple-files-one-from"
########
echo ########################################################
echo test "build-from-multiple-files-one-from"
echo ########################################################
TARGET=scratch-image
podman build -t $TARGET -file $HOME/test/build/from-multiple-files/Dockerfile1.scratch -file $HOME/test/build/from-multiple-files/Dockerfile2.nofrom
CID=$(buildah from $TARGET)
@ -146,9 +146,9 @@ HOME=`pwd`
buildah --debug=false images -q
########
# test "build-from-multiple-files-two-froms"
########
echo ########################################################
echo test "build-from-multiple-files-two-froms"
echo ########################################################
TARGET=scratch-image
podman build -t $TARGET -file $HOME/test/build/from-multiple-files/Dockerfile1.scratch -file $HOME/test/build/from-multiple-files/Dockerfile2.withfrom
CID=$(buildah from $TARGET)
@ -170,3 +170,29 @@ HOME=`pwd`
buildah rm $CID
podman rmi $(buildah --debug=false images -q)
buildah --debug=false images -q
echo ########################################################
echo test "build-from-multiple-files-two-froms" with "-f -"
echo ########################################################
TARGET=scratch-image
cat $HOME/test/build/from-multiple-files/Dockerfile1.alpine | podman build -t ${TARGET} -file - -file Dockerfile2.withfrom $HOME/test/build/from-multiple-files
CID=$(buildah from $TARGET)
ROOT=$(buildah mount $CID)
cmp $ROOT/Dockerfile1 $HOME/test/build/from-multiple-files/Dockerfile1.alpine
cmp $ROOT/Dockerfile2.withfrom $HOME/test/build/from-multiple-files/Dockerfile2.withfrom
test -s $ROOT/etc/passwd
buildah rm $CID
podman rmi $(buildah --debug=false images -q)
buildah --debug=false images -q
echo ########################################################
echo test "build with preprocessor"
echo ########################################################
target=alpine-image
podman build -q -t ${TARGET} -f Decomposed.in $HOME/test/build/preprocess
buildah --debug=false images
CID=$(buildah from $TARGET)
buildah rm $CID
podman rmi $(buildah --debug=false images -q)
buildah --debug=false images -q