Add --all,-a flag to podman images

podman images will not show intermediate images by default.
To view all images, including intermediate images created during
a build, use the --all flag.

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #947
Approved by: rhatdan
This commit is contained in:
umohnani8
2018-06-14 14:53:59 -04:00
committed by Atomic Bot
parent 4d3db1b4a9
commit db094f6e15
6 changed files with 77 additions and 16 deletions

View File

@ -593,11 +593,11 @@ func (p *PodmanTest) GetContainerStatus() string {
// BuildImage uses podman build and buildah to build an image
// called imageName based on a string dockerfile
func (p *PodmanTest) BuildImage(dockerfile, imageName string) {
func (p *PodmanTest) BuildImage(dockerfile, imageName string, layers string) {
dockerfilePath := filepath.Join(p.TempDir, "Dockerfile")
err := ioutil.WriteFile(dockerfilePath, []byte(dockerfile), 0755)
Expect(err).To(BeNil())
session := p.Podman([]string{"build", "-t", imageName, "--file", dockerfilePath, p.TempDir})
session := p.Podman([]string{"build", "--layers=" + layers, "-t", imageName, "--file", dockerfilePath, p.TempDir})
session.Wait(120)
Expect(session.ExitCode()).To(Equal(0))
}