aboutsummaryrefslogtreecommitdiff
path: root/test/build
diff options
context:
space:
mode:
authorTomSweeneyRedHat <tsweeney@redhat.com>2017-12-20 17:54:13 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2017-12-23 11:47:33 +0000
commitea5620182f6dc1fabc33e1a8d453d070fba0952c (patch)
treeb19193b6ba56b5be899a2619e7adde5c6e1c9787 /test/build
parent7f531263e6e41195278f205ad01274487cc1c1e0 (diff)
downloadpodman-ea5620182f6dc1fabc33e1a8d453d070fba0952c.tar.gz
podman-ea5620182f6dc1fabc33e1a8d453d070fba0952c.tar.bz2
podman-ea5620182f6dc1fabc33e1a8d453d070fba0952c.zip
Initial podman build
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com> Closes: #162 Approved by: rhatdan
Diffstat (limited to 'test/build')
-rw-r--r--test/build/from-multiple-files/Dockerfile1.alpine2
-rw-r--r--test/build/from-multiple-files/Dockerfile1.scratch2
-rw-r--r--test/build/from-multiple-files/Dockerfile2.glob2
-rw-r--r--test/build/from-multiple-files/Dockerfile2.nofrom1
-rw-r--r--test/build/from-multiple-files/Dockerfile2.withfrom2
-rw-r--r--test/build/from-scratch/Dockerfile1
-rw-r--r--test/build/http-context-subdir/context.tarbin0 -> 10240 bytes
-rw-r--r--test/build/http-context/context.tarbin0 -> 10240 bytes
-rw-r--r--test/build/preserve-volumes/Dockerfile22
-rw-r--r--test/build/volume-perms/Dockerfile6
10 files changed, 38 insertions, 0 deletions
diff --git a/test/build/from-multiple-files/Dockerfile1.alpine b/test/build/from-multiple-files/Dockerfile1.alpine
new file mode 100644
index 000000000..c6e3fc405
--- /dev/null
+++ b/test/build/from-multiple-files/Dockerfile1.alpine
@@ -0,0 +1,2 @@
+FROM alpine
+COPY Dockerfile1.alpine /Dockerfile1
diff --git a/test/build/from-multiple-files/Dockerfile1.scratch b/test/build/from-multiple-files/Dockerfile1.scratch
new file mode 100644
index 000000000..4f9ab8a60
--- /dev/null
+++ b/test/build/from-multiple-files/Dockerfile1.scratch
@@ -0,0 +1,2 @@
+FROM scratch
+COPY Dockerfile1.scratch /Dockerfile1
diff --git a/test/build/from-multiple-files/Dockerfile2.glob b/test/build/from-multiple-files/Dockerfile2.glob
new file mode 100644
index 000000000..1d843ba07
--- /dev/null
+++ b/test/build/from-multiple-files/Dockerfile2.glob
@@ -0,0 +1,2 @@
+FROM alpine
+COPY Dockerfile* /
diff --git a/test/build/from-multiple-files/Dockerfile2.nofrom b/test/build/from-multiple-files/Dockerfile2.nofrom
new file mode 100644
index 000000000..0473c91d8
--- /dev/null
+++ b/test/build/from-multiple-files/Dockerfile2.nofrom
@@ -0,0 +1 @@
+COPY Dockerfile2.nofrom /
diff --git a/test/build/from-multiple-files/Dockerfile2.withfrom b/test/build/from-multiple-files/Dockerfile2.withfrom
new file mode 100644
index 000000000..fa3b96908
--- /dev/null
+++ b/test/build/from-multiple-files/Dockerfile2.withfrom
@@ -0,0 +1,2 @@
+FROM alpine
+COPY Dockerfile2.withfrom /
diff --git a/test/build/from-scratch/Dockerfile b/test/build/from-scratch/Dockerfile
new file mode 100644
index 000000000..c35f1b5f5
--- /dev/null
+++ b/test/build/from-scratch/Dockerfile
@@ -0,0 +1 @@
+FROM scratch
diff --git a/test/build/http-context-subdir/context.tar b/test/build/http-context-subdir/context.tar
new file mode 100644
index 000000000..533ae524e
--- /dev/null
+++ b/test/build/http-context-subdir/context.tar
Binary files differ
diff --git a/test/build/http-context/context.tar b/test/build/http-context/context.tar
new file mode 100644
index 000000000..2e5f3a515
--- /dev/null
+++ b/test/build/http-context/context.tar
Binary files differ
diff --git a/test/build/preserve-volumes/Dockerfile b/test/build/preserve-volumes/Dockerfile
new file mode 100644
index 000000000..922f565d7
--- /dev/null
+++ b/test/build/preserve-volumes/Dockerfile
@@ -0,0 +1,22 @@
+FROM alpine
+RUN mkdir -p /vol/subvol/subsubvol
+RUN dd if=/dev/zero bs=512 count=1 of=/vol/subvol/subsubvol/subsubvolfile
+VOLUME /vol/subvol
+# At this point, the contents below /vol/subvol should be frozen.
+RUN dd if=/dev/zero bs=512 count=1 of=/vol/subvol/subvolfile
+# In particular, /vol/subvol/subvolfile should be wiped out.
+RUN dd if=/dev/zero bs=512 count=1 of=/vol/volfile
+# However, /vol/volfile should exist.
+VOLUME /vol
+# And this should be redundant.
+VOLUME /vol/subvol
+# And now we've frozen /vol.
+RUN dd if=/dev/zero bs=512 count=1 of=/vol/anothervolfile
+# Which means that in the image we're about to commit, /vol/anothervolfile
+# shouldn't exist, either.
+
+# ADD files which should persist.
+ADD Dockerfile /vol/Dockerfile
+RUN stat /vol/Dockerfile
+ADD Dockerfile /vol/Dockerfile2
+RUN stat /vol/Dockerfile2
diff --git a/test/build/volume-perms/Dockerfile b/test/build/volume-perms/Dockerfile
new file mode 100644
index 000000000..4dced7738
--- /dev/null
+++ b/test/build/volume-perms/Dockerfile
@@ -0,0 +1,6 @@
+FROM alpine
+VOLUME /vol/subvol
+# At this point, the directory should exist, with default permissions 0755, the
+# contents below /vol/subvol should be frozen, and we shouldn't get an error
+# from trying to write to it because we it was created automatically.
+RUN dd if=/dev/zero bs=512 count=1 of=/vol/subvol/subvolfile