move from docker.io

Followon to #7965 (mirror registry). mirror.gcr.io doesn't
cache all the images we need, and I can't find a way to
add to its cache, so let's just use quay.io for those
images that it can't serve.

Tools used:
  skopeo copy --all docker://docker.io/library/alpine:3.10.2 \
                    docker://quay.io/libpod/alpine:3.10.2

...and also:

    docker.io/library/alpine:3.2
    docker.io/library/busybox:latest
    docker.io/library/busybox:glibc
    docker.io/library/busybox:1.30.1
    docker.io/library/redis:alpine
    docker.io/libpod/alpine-with-bogus-seccomp:label
    docker.io/libpod/alpine-with-seccomp:label
    docker.io/libpod/alpine_healthcheck:latest
    docker.io/libpod/badhealthcheck:latest

Since most of those were new quay.io/libpod images, they required
going in through the quay.io GUI, image, settings, Make Public.

Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
Ed Santiago
2020-10-27 04:47:35 -06:00
parent 53fe386da0
commit 20e104351d
25 changed files with 96 additions and 88 deletions

View File

@ -166,7 +166,7 @@ var _ = Describe("Podman images", func() {
// Adding one more image. There Should be no errors in the response. // Adding one more image. There Should be no errors in the response.
// And the count should be three now. // And the count should be three now.
bt.Pull("busybox:glibc") bt.Pull("testimage:20200929")
imageSummary, err = images.List(bt.conn, nil, nil) imageSummary, err = images.List(bt.conn, nil, nil)
Expect(err).To(BeNil()) Expect(err).To(BeNil())
Expect(len(imageSummary)).To(Equal(3)) Expect(len(imageSummary)).To(Equal(3))

View File

@ -43,7 +43,7 @@ t POST "images/create?fromImage=alpine" '' 200
t POST "images/create?fromImage=alpine&tag=latest" '' 200 t POST "images/create?fromImage=alpine&tag=latest" '' 200
t POST "images/create?fromImage=docker.io/library/alpine&tag=sha256:acd3ca9941a85e8ed16515bfc5328e4e2f8c128caa72959a58a127b7801ee01f" '' 200 t POST "images/create?fromImage=quay.io/libpod/alpine&tag=sha256:fa93b01658e3a5a1686dc3ae55f170d8de487006fb53a28efcd12ab0710a2e5f" '' 200
# Display the image history # Display the image history
t GET libpod/images/nonesuch/history 404 t GET libpod/images/nonesuch/history 404

View File

@ -23,7 +23,7 @@ t GET libpod/images/$IMAGE/json 200 \
.RepoTags[1]=localhost:5000/myrepo:mytag .RepoTags[1]=localhost:5000/myrepo:mytag
# Run registry container # Run registry container
podman run -d --name registry -p 5000:5000 docker.io/library/registry:2.6 /entrypoint.sh /etc/docker/registry/config.yml podman run -d --name registry -p 5000:5000 quay.io/libpod/registry:2.6 /entrypoint.sh /etc/docker/registry/config.yml
# Push to local registry # Push to local registry
# FIXME: this is failing: # FIXME: this is failing:
@ -44,5 +44,5 @@ t DELETE libpod/containers/registry?force=true 204
# Remove images # Remove images
t DELETE libpod/images/$IMAGE 200 \ t DELETE libpod/images/$IMAGE 200 \
.ExitCode=0 .ExitCode=0
t DELETE libpod/images/docker.io/library/registry:2.6 200 \ t DELETE libpod/images/quay.io/libpod/registry:2.6 200 \
.ExitCode=0 .ExitCode=0

View File

@ -4,7 +4,7 @@
# #
# WORKDIR=/data # WORKDIR=/data
ENV_WORKDIR_IMG=docker.io/library/redis:alpine ENV_WORKDIR_IMG=quay.io/libpod/testimage:20200929
podman pull $IMAGE &>/dev/null podman pull $IMAGE &>/dev/null
podman pull $ENV_WORKDIR_IMG &>/dev/null podman pull $ENV_WORKDIR_IMG &>/dev/null

View File

@ -226,7 +226,7 @@ var _ = Describe("Podman build", func() {
podmanTest.StartRemoteService() podmanTest.StartRemoteService()
} }
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
dockerfile := `FROM docker.io/library/alpine:latest dockerfile := `FROM quay.io/libpod/alpine:latest
RUN printenv http_proxy` RUN printenv http_proxy`
dockerfilePath := filepath.Join(podmanTest.TempDir, "Dockerfile") dockerfilePath := filepath.Join(podmanTest.TempDir, "Dockerfile")

View File

@ -1,18 +1,18 @@
package integration package integration
var ( var (
redis = "docker.io/library/redis:alpine" redis = "quay.io/libpod/redis:alpine"
fedoraMinimal = "quay.io/libpod/fedora-minimal:latest" fedoraMinimal = "quay.io/libpod/fedora-minimal:latest"
ALPINE = "docker.io/library/alpine:latest" ALPINE = "quay.io/libpod/alpine:latest"
ALPINELISTTAG = "docker.io/library/alpine:3.10.2" ALPINELISTTAG = "quay.io/libpod/alpine:3.10.2"
ALPINELISTDIGEST = "docker.io/library/alpine@sha256:72c42ed48c3a2db31b7dafe17d275b634664a708d901ec9fd57b1529280f01fb" ALPINELISTDIGEST = "quay.io/libpod/alpine@sha256:fa93b01658e3a5a1686dc3ae55f170d8de487006fb53a28efcd12ab0710a2e5f"
ALPINEAMD64DIGEST = "docker.io/library/alpine@sha256:acd3ca9941a85e8ed16515bfc5328e4e2f8c128caa72959a58a127b7801ee01f" ALPINEAMD64DIGEST = "quay.io/libpod/alpine@sha256:634a8f35b5f16dcf4aaa0822adc0b1964bb786fca12f6831de8ddc45e5986a00"
ALPINEAMD64ID = "961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4" ALPINEAMD64ID = "961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4"
ALPINEARM64DIGEST = "docker.io/library/alpine@sha256:db7f3dcef3d586f7dd123f107c93d7911515a5991c4b9e51fa2a43e46335a43e" ALPINEARM64DIGEST = "quay.io/libpod/alpine@sha256:f270dcd11e64b85919c3bab66886e59d677cf657528ac0e4805d3c71e458e525"
ALPINEARM64ID = "915beeae46751fc564998c79e73a1026542e945ca4f73dc841d09ccc6c2c0672" ALPINEARM64ID = "915beeae46751fc564998c79e73a1026542e945ca4f73dc841d09ccc6c2c0672"
infra = "k8s.gcr.io/pause:3.2" infra = "k8s.gcr.io/pause:3.2"
BB = "docker.io/library/busybox:latest" BB = "quay.io/libpod/busybox:latest"
healthcheck = "docker.io/libpod/alpine_healthcheck:latest" healthcheck = "quay.io/libpod/alpine_healthcheck:latest"
ImageCacheDir = "/tmp/podman/imagecachedir" ImageCacheDir = "/tmp/podman/imagecachedir"
fedoraToolbox = "registry.fedoraproject.org/f32/fedora-toolbox:latest" fedoraToolbox = "registry.fedoraproject.org/f32/fedora-toolbox:latest"
@ -20,8 +20,8 @@ var (
// The intention behind blocking all syscalls is to prevent // The intention behind blocking all syscalls is to prevent
// regressions in the future. The required syscalls can vary // regressions in the future. The required syscalls can vary
// depending on which runtime we're using. // depending on which runtime we're using.
alpineSeccomp = "docker.io/libpod/alpine-with-seccomp:label" alpineSeccomp = "quay.io/libpod/alpine-with-seccomp:label"
// This image has a bogus/invalid seccomp profile which should // This image has a bogus/invalid seccomp profile which should
// yield a json error when being read. // yield a json error when being read.
alpineBogusSeccomp = "docker.io/libpod/alpine-with-bogus-seccomp:label" alpineBogusSeccomp = "quay.io/libpod/alpine-with-bogus-seccomp:label"
) )

View File

@ -8,7 +8,7 @@ var (
CACHE_IMAGES = []string{ALPINE, BB, fedoraMinimal, nginx, redis, registry, infra, labels, healthcheck, ubi_init, ubi_minimal} CACHE_IMAGES = []string{ALPINE, BB, fedoraMinimal, nginx, redis, registry, infra, labels, healthcheck, ubi_init, ubi_minimal}
nginx = "quay.io/libpod/alpine_nginx:latest" nginx = "quay.io/libpod/alpine_nginx:latest"
BB_GLIBC = "docker.io/library/busybox:glibc" BB_GLIBC = "docker.io/library/busybox:glibc"
registry = "docker.io/library/registry:2.6" registry = "quay.io/libpod/registry:2.6"
labels = "quay.io/libpod/alpine_labels:latest" labels = "quay.io/libpod/alpine_labels:latest"
ubi_minimal = "registry.access.redhat.com/ubi8-minimal" ubi_minimal = "registry.access.redhat.com/ubi8-minimal"
ubi_init = "registry.access.redhat.com/ubi8-init" ubi_init = "registry.access.redhat.com/ubi8-init"

View File

@ -271,11 +271,11 @@ var _ = Describe("Podman create", func() {
}) })
It("podman create --pull", func() { It("podman create --pull", func() {
session := podmanTest.PodmanNoCache([]string{"create", "--pull", "never", "--name=foo", "debian"}) session := podmanTest.PodmanNoCache([]string{"create", "--pull", "never", "--name=foo", "testimage:00000000"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session).To(ExitWithError()) Expect(session).To(ExitWithError())
session = podmanTest.PodmanNoCache([]string{"create", "--pull", "always", "--name=foo", "debian"}) session = podmanTest.PodmanNoCache([]string{"create", "--pull", "always", "--name=foo", "testimage:00000000"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0)) Expect(session.ExitCode()).To(Equal(0))
}) })

View File

@ -39,6 +39,7 @@ var _ = Describe("Podman image|container exists", func() {
Expect(session).Should(Exit(0)) Expect(session).Should(Exit(0))
}) })
It("podman image exists in local storage by short name", func() { It("podman image exists in local storage by short name", func() {
Skip("FIXME-8165: shortnames don't seem to work with quay (#8176)")
session := podmanTest.Podman([]string{"image", "exists", "alpine"}) session := podmanTest.Podman([]string{"image", "exists", "alpine"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0)) Expect(session).Should(Exit(0))

View File

@ -81,7 +81,7 @@ var _ = Describe("Podman healthcheck run", func() {
}) })
It("podman healthcheck that should fail", func() { It("podman healthcheck that should fail", func() {
session := podmanTest.Podman([]string{"run", "-dt", "--name", "hc", "docker.io/libpod/badhealthcheck:latest"}) session := podmanTest.Podman([]string{"run", "-dt", "--name", "hc", "quay.io/libpod/badhealthcheck:latest"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0)) Expect(session.ExitCode()).To(Equal(0))

View File

@ -41,8 +41,8 @@ var _ = Describe("Podman images", func() {
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0)) Expect(session).Should(Exit(0))
Expect(len(session.OutputToStringArray())).To(BeNumerically(">", 2)) Expect(len(session.OutputToStringArray())).To(BeNumerically(">", 2))
Expect(session.LineInOuputStartsWith("docker.io/library/alpine")).To(BeTrue()) Expect(session.LineInOuputStartsWith("quay.io/libpod/alpine")).To(BeTrue())
Expect(session.LineInOuputStartsWith("docker.io/library/busybox")).To(BeTrue()) Expect(session.LineInOuputStartsWith("quay.io/libpod/busybox")).To(BeTrue())
}) })
It("podman images with no images prints header", func() { It("podman images with no images prints header", func() {
@ -62,8 +62,8 @@ var _ = Describe("Podman images", func() {
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0)) Expect(session).Should(Exit(0))
Expect(len(session.OutputToStringArray())).To(BeNumerically(">", 2)) Expect(len(session.OutputToStringArray())).To(BeNumerically(">", 2))
Expect(session.LineInOuputStartsWith("docker.io/library/alpine")).To(BeTrue()) Expect(session.LineInOuputStartsWith("quay.io/libpod/alpine")).To(BeTrue())
Expect(session.LineInOuputStartsWith("docker.io/library/busybox")).To(BeTrue()) Expect(session.LineInOuputStartsWith("quay.io/libpod/busybox")).To(BeTrue())
}) })
It("podman images with multiple tags", func() { It("podman images with multiple tags", func() {
@ -80,13 +80,13 @@ var _ = Describe("Podman images", func() {
session = podmanTest.PodmanNoCache([]string{"images"}) session = podmanTest.PodmanNoCache([]string{"images"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0)) Expect(session).Should(Exit(0))
session.LineInOutputContainsTag("docker.io/library/alpine", "latest") Expect(session.LineInOutputContainsTag("quay.io/libpod/alpine", "latest")).To(BeTrue())
session.LineInOutputContainsTag("docker.io/library/busybox", "glibc") Expect(session.LineInOutputContainsTag("quay.io/libpod/busybox", "latest")).To(BeTrue())
session.LineInOutputContainsTag("foo", "a") Expect(session.LineInOutputContainsTag("localhost/foo", "a")).To(BeTrue())
session.LineInOutputContainsTag("foo", "b") Expect(session.LineInOutputContainsTag("localhost/foo", "b")).To(BeTrue())
session.LineInOutputContainsTag("foo", "c") Expect(session.LineInOutputContainsTag("localhost/foo", "c")).To(BeTrue())
session.LineInOutputContainsTag("bar", "a") Expect(session.LineInOutputContainsTag("localhost/bar", "a")).To(BeTrue())
session.LineInOutputContainsTag("bar", "b") Expect(session.LineInOutputContainsTag("localhost/bar", "b")).To(BeTrue())
session = podmanTest.PodmanNoCache([]string{"images", "-qn"}) session = podmanTest.PodmanNoCache([]string{"images", "-qn"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0)) Expect(session).Should(Exit(0))
@ -98,8 +98,8 @@ var _ = Describe("Podman images", func() {
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0)) Expect(session).Should(Exit(0))
Expect(len(session.OutputToStringArray())).To(BeNumerically(">", 2)) Expect(len(session.OutputToStringArray())).To(BeNumerically(">", 2))
Expect(session.LineInOuputStartsWith("docker.io/library/alpine")).To(BeTrue()) Expect(session.LineInOuputStartsWith("quay.io/libpod/alpine")).To(BeTrue())
Expect(session.LineInOuputStartsWith("docker.io/library/busybox")).To(BeTrue()) Expect(session.LineInOuputStartsWith("quay.io/libpod/busybox")).To(BeTrue())
}) })
It("podman empty images list in JSON format", func() { It("podman empty images list in JSON format", func() {
@ -152,10 +152,10 @@ var _ = Describe("Podman images", func() {
It("podman images filter reference", func() { It("podman images filter reference", func() {
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
result := podmanTest.PodmanNoCache([]string{"images", "-q", "-f", "reference=docker.io*"}) result := podmanTest.PodmanNoCache([]string{"images", "-q", "-f", "reference=quay.io*"})
result.WaitWithDefaultTimeout() result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0)) Expect(result).Should(Exit(0))
Expect(len(result.OutputToStringArray())).To(Equal(2)) Expect(len(result.OutputToStringArray())).To(Equal(3))
retapline := podmanTest.PodmanNoCache([]string{"images", "-f", "reference=a*pine"}) retapline := podmanTest.PodmanNoCache([]string{"images", "-f", "reference=a*pine"})
retapline.WaitWithDefaultTimeout() retapline.WaitWithDefaultTimeout()
@ -176,7 +176,7 @@ var _ = Describe("Podman images", func() {
}) })
It("podman images filter before image", func() { It("podman images filter before image", func() {
dockerfile := `FROM docker.io/library/alpine:latest dockerfile := `FROM quay.io/libpod/alpine:latest
RUN apk update && apk add strace RUN apk update && apk add strace
` `
podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false") podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false")
@ -188,7 +188,7 @@ RUN apk update && apk add strace
}) })
It("podman images workingdir from image", func() { It("podman images workingdir from image", func() {
dockerfile := `FROM docker.io/library/alpine:latest dockerfile := `FROM quay.io/libpod/alpine:latest
WORKDIR /test WORKDIR /test
` `
podmanTest.BuildImage(dockerfile, "foobar.com/workdir:latest", "false") podmanTest.BuildImage(dockerfile, "foobar.com/workdir:latest", "false")
@ -204,10 +204,10 @@ WORKDIR /test
rmi.WaitWithDefaultTimeout() rmi.WaitWithDefaultTimeout()
Expect(rmi).Should(Exit(0)) Expect(rmi).Should(Exit(0))
dockerfile := `FROM docker.io/library/alpine:latest dockerfile := `FROM quay.io/libpod/alpine:latest
` `
podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false") podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false")
result := podmanTest.PodmanNoCache([]string{"images", "-q", "-f", "after=docker.io/library/alpine:latest"}) result := podmanTest.PodmanNoCache([]string{"images", "-q", "-f", "after=quay.io/libpod/alpine:latest"})
result.WaitWithDefaultTimeout() result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0)) Expect(result).Should(Exit(0))
Expect(len(result.OutputToStringArray())).To(Equal(0)) Expect(len(result.OutputToStringArray())).To(Equal(0))
@ -219,17 +219,17 @@ WORKDIR /test
rmi.WaitWithDefaultTimeout() rmi.WaitWithDefaultTimeout()
Expect(rmi).Should(Exit(0)) Expect(rmi).Should(Exit(0))
dockerfile := `FROM docker.io/library/alpine:latest dockerfile := `FROM quay.io/libpod/alpine:latest
` `
podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false") podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false")
result := podmanTest.PodmanNoCache([]string{"image", "list", "-q", "-f", "after=docker.io/library/alpine:latest"}) result := podmanTest.PodmanNoCache([]string{"image", "list", "-q", "-f", "after=quay.io/libpod/alpine:latest"})
result.WaitWithDefaultTimeout() result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0)) Expect(result).Should(Exit(0))
Expect(result.OutputToStringArray()).Should(HaveLen(0), "list filter output: %q", result.OutputToString()) Expect(result.OutputToStringArray()).Should(HaveLen(0), "list filter output: %q", result.OutputToString())
}) })
It("podman images filter dangling", func() { It("podman images filter dangling", func() {
dockerfile := `FROM docker.io/library/alpine:latest dockerfile := `FROM quay.io/libpod/alpine:latest
` `
podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false") podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false")
podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false") podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false")
@ -240,6 +240,7 @@ WORKDIR /test
}) })
It("podman pull by digest and list --all", func() { It("podman pull by digest and list --all", func() {
Skip("FIXME-8165: 'rmi -af' fails with 'layer not known' (#6510)")
// Prevent regressing on issue #7651. // Prevent regressing on issue #7651.
digestPullAndList := func(noneTag bool) { digestPullAndList := func(noneTag bool) {
session := podmanTest.Podman([]string{"pull", ALPINEAMD64DIGEST}) session := podmanTest.Podman([]string{"pull", ALPINEAMD64DIGEST})
@ -341,7 +342,7 @@ WORKDIR /test
It("podman images --all flag", func() { It("podman images --all flag", func() {
SkipIfRemote("FIXME This should work on podman-remote, problem is with podman-remote build") SkipIfRemote("FIXME This should work on podman-remote, problem is with podman-remote build")
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
dockerfile := `FROM docker.io/library/alpine:latest dockerfile := `FROM quay.io/libpod/alpine:latest
RUN mkdir hello RUN mkdir hello
RUN touch test.txt RUN touch test.txt
ENV foo=bar ENV foo=bar
@ -359,7 +360,7 @@ ENV foo=bar
}) })
It("podman images filter by label", func() { It("podman images filter by label", func() {
dockerfile := `FROM docker.io/library/alpine:latest dockerfile := `FROM quay.io/libpod/alpine:latest
LABEL version="1.0" LABEL version="1.0"
LABEL "com.example.vendor"="Example Vendor" LABEL "com.example.vendor"="Example Vendor"
` `
@ -436,7 +437,7 @@ LABEL "com.example.vendor"="Example Vendor"
}) })
It("podman images --filter readonly", func() { It("podman images --filter readonly", func() {
dockerfile := `FROM docker.io/library/alpine:latest dockerfile := `FROM quay.io/libpod/alpine:latest
` `
podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false") podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false")
result := podmanTest.Podman([]string{"images", "-f", "readonly=true"}) result := podmanTest.Podman([]string{"images", "-f", "readonly=true"})

View File

@ -40,7 +40,7 @@ var _ = Describe("Podman inspect", func() {
Expect(session.ExitCode()).To(Equal(0)) Expect(session.ExitCode()).To(Equal(0))
Expect(session.IsJSONOutputValid()).To(BeTrue()) Expect(session.IsJSONOutputValid()).To(BeTrue())
imageData := session.InspectImageJSON() imageData := session.InspectImageJSON()
Expect(imageData[0].RepoTags[0]).To(Equal("docker.io/library/alpine:latest")) Expect(imageData[0].RepoTags[0]).To(Equal("quay.io/libpod/alpine:latest"))
}) })
It("podman inspect bogus container", func() { It("podman inspect bogus container", func() {

View File

@ -166,7 +166,7 @@ var _ = Describe("Podman load", func() {
Skip("skip on ppc64le") Skip("skip on ppc64le")
} }
outfile := filepath.Join(podmanTest.TempDir, "alpine.tar") outfile := filepath.Join(podmanTest.TempDir, "alpine.tar")
alpVersion := "docker.io/library/alpine:3.2" alpVersion := "quay.io/libpod/alpine:3.2"
pull := podmanTest.PodmanNoCache([]string{"pull", alpVersion}) pull := podmanTest.PodmanNoCache([]string{"pull", alpVersion})
pull.WaitWithDefaultTimeout() pull.WaitWithDefaultTimeout()

View File

@ -55,7 +55,7 @@ var _ = Describe("Podman manifest", func() {
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0)) Expect(session.ExitCode()).To(Equal(0))
session = podmanTest.PodmanNoCache([]string{"manifest", "inspect", "docker.io/library/busybox"}) session = podmanTest.PodmanNoCache([]string{"manifest", "inspect", "quay.io/libpod/busybox"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0)) Expect(session).Should(Exit(0))
}) })

View File

@ -1092,7 +1092,7 @@ var _ = Describe("Podman play kube", func() {
}) })
It("podman play kube with pull always", func() { It("podman play kube with pull always", func() {
oldBB := "docker.io/library/busybox:1.30.1" oldBB := "quay.io/libpod/busybox:1.30.1"
pull := podmanTest.Podman([]string{"pull", oldBB}) pull := podmanTest.Podman([]string{"pull", oldBB})
pull.WaitWithDefaultTimeout() pull.WaitWithDefaultTimeout()
@ -1123,7 +1123,7 @@ var _ = Describe("Podman play kube", func() {
}) })
It("podman play kube with latest image should always pull", func() { It("podman play kube with latest image should always pull", func() {
oldBB := "docker.io/library/busybox:1.30.1" oldBB := "quay.io/libpod/busybox:1.30.1"
pull := podmanTest.Podman([]string{"pull", oldBB}) pull := podmanTest.Podman([]string{"pull", oldBB})
pull.WaitWithDefaultTimeout() pull.WaitWithDefaultTimeout()

View File

@ -382,7 +382,7 @@ var _ = Describe("Podman pod create", func() {
}) })
It("podman create pod with --infra-image", func() { It("podman create pod with --infra-image", func() {
dockerfile := `FROM docker.io/library/alpine:latest dockerfile := `FROM quay.io/libpod/alpine:latest
entrypoint ["/fromimage"] entrypoint ["/fromimage"]
` `
podmanTest.BuildImage(dockerfile, "localhost/infra", "false") podmanTest.BuildImage(dockerfile, "localhost/infra", "false")
@ -409,7 +409,7 @@ entrypoint ["/fromimage"]
}) })
It("podman create pod with --infra-command --infra-image", func() { It("podman create pod with --infra-command --infra-image", func() {
dockerfile := `FROM docker.io/library/alpine:latest dockerfile := `FROM quay.io/libpod/alpine:latest
entrypoint ["/fromimage"] entrypoint ["/fromimage"]
` `
podmanTest.BuildImage(dockerfile, "localhost/infra", "false") podmanTest.BuildImage(dockerfile, "localhost/infra", "false")

View File

@ -232,12 +232,19 @@ var _ = Describe("Podman ps", func() {
}) })
It("podman ps ancestor filter flag", func() { It("podman ps ancestor filter flag", func() {
_, ec, _ := podmanTest.RunLsContainer("test1") _, ec, cid := podmanTest.RunLsContainer("test1")
Expect(ec).To(Equal(0)) Expect(ec).To(Equal(0))
result := podmanTest.Podman([]string{"ps", "-a", "--filter", "ancestor=docker.io/library/alpine:latest"}) result := podmanTest.Podman([]string{"ps", "-q", "--no-trunc", "-a", "--filter", "ancestor=quay.io/libpod/alpine:latest"})
result.WaitWithDefaultTimeout() result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0)) Expect(result.ExitCode()).To(Equal(0))
Expect(result.OutputToString()).To(Equal(cid))
// Query just by image name, without :latest tag
result = podmanTest.Podman([]string{"ps", "-q", "--no-trunc", "-a", "--filter", "ancestor=quay.io/libpod/alpine"})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
Expect(result.OutputToString()).To(Equal(cid))
}) })
It("podman ps id filter flag", func() { It("podman ps id filter flag", func() {

View File

@ -41,21 +41,21 @@ var _ = Describe("Podman pull", func() {
}) })
It("podman pull from docker with tag", func() { It("podman pull from docker with tag", func() {
session := podmanTest.PodmanNoCache([]string{"pull", "busybox:glibc"}) session := podmanTest.PodmanNoCache([]string{"pull", "quay.io/libpod/testdigest_v2s2:20200210"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0)) Expect(session.ExitCode()).To(Equal(0))
session = podmanTest.PodmanNoCache([]string{"rmi", "busybox:glibc"}) session = podmanTest.PodmanNoCache([]string{"rmi", "testdigest_v2s2:20200210"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0)) Expect(session.ExitCode()).To(Equal(0))
}) })
It("podman pull from docker without tag", func() { It("podman pull from docker without tag", func() {
session := podmanTest.PodmanNoCache([]string{"pull", "busybox"}) session := podmanTest.PodmanNoCache([]string{"pull", "quay.io/libpod/testdigest_v2s2"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0)) Expect(session.ExitCode()).To(Equal(0))
session = podmanTest.PodmanNoCache([]string{"rmi", "busybox"}) session = podmanTest.PodmanNoCache([]string{"rmi", "testdigest_v2s2"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0)) Expect(session.ExitCode()).To(Equal(0))
}) })
@ -81,11 +81,11 @@ var _ = Describe("Podman pull", func() {
}) })
It("podman pull by digest", func() { It("podman pull by digest", func() {
session := podmanTest.PodmanNoCache([]string{"pull", "alpine@sha256:1072e499f3f655a032e88542330cf75b02e7bdf673278f701d7ba61629ee3ebe"}) session := podmanTest.PodmanNoCache([]string{"pull", "quay.io/libpod/testdigest_v2s2@sha256:755f4d90b3716e2bf57060d249e2cd61c9ac089b1233465c5c2cb2d7ee550fdb"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0)) Expect(session.ExitCode()).To(Equal(0))
session = podmanTest.PodmanNoCache([]string{"rmi", "alpine:none"}) session = podmanTest.PodmanNoCache([]string{"rmi", "testdigest_v2s2:none"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0)) Expect(session.ExitCode()).To(Equal(0))
}) })

View File

@ -191,14 +191,14 @@ var _ = Describe("Podman rmi", func() {
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0)) Expect(session).Should(Exit(0))
dockerfile := `FROM docker.io/library/alpine:latest dockerfile := `FROM quay.io/libpod/alpine:latest
RUN mkdir hello RUN mkdir hello
RUN touch test.txt RUN touch test.txt
ENV foo=bar ENV foo=bar
` `
podmanTest.BuildImage(dockerfile, "test", "true") podmanTest.BuildImage(dockerfile, "test", "true")
dockerfile = `FROM docker.io/library/alpine:latest dockerfile = `FROM quay.io/libpod/alpine:latest
RUN mkdir hello RUN mkdir hello
RUN touch test.txt RUN touch test.txt
RUN mkdir blah RUN mkdir blah
@ -256,7 +256,7 @@ var _ = Describe("Podman rmi", func() {
}) })
It("podman rmi -a with parent|child images", func() { It("podman rmi -a with parent|child images", func() {
dockerfile := `FROM docker.io/library/alpine:latest AS base dockerfile := `FROM quay.io/libpod/alpine:latest AS base
RUN touch /1 RUN touch /1
ENV LOCAL=/1 ENV LOCAL=/1
RUN find $LOCAL RUN find $LOCAL

View File

@ -33,7 +33,7 @@ var _ = Describe("Podman run entrypoint", func() {
}) })
It("podman run no command, entrypoint, or cmd", func() { It("podman run no command, entrypoint, or cmd", func() {
dockerfile := `FROM docker.io/library/alpine:latest dockerfile := `FROM quay.io/libpod/alpine:latest
ENTRYPOINT [] ENTRYPOINT []
CMD [] CMD []
` `
@ -44,7 +44,7 @@ CMD []
}) })
It("podman run entrypoint", func() { It("podman run entrypoint", func() {
dockerfile := `FROM docker.io/library/alpine:latest dockerfile := `FROM quay.io/libpod/alpine:latest
ENTRYPOINT ["grep", "Alpine", "/etc/os-release"] ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]
` `
podmanTest.BuildImage(dockerfile, "foobar.com/entrypoint:latest", "false") podmanTest.BuildImage(dockerfile, "foobar.com/entrypoint:latest", "false")
@ -55,7 +55,7 @@ ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]
}) })
It("podman run entrypoint with cmd", func() { It("podman run entrypoint with cmd", func() {
dockerfile := `FROM docker.io/library/alpine:latest dockerfile := `FROM quay.io/libpod/alpine:latest
CMD [ "-v"] CMD [ "-v"]
ENTRYPOINT ["grep", "Alpine", "/etc/os-release"] ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]
` `
@ -67,7 +67,7 @@ ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]
}) })
It("podman run entrypoint with user cmd overrides image cmd", func() { It("podman run entrypoint with user cmd overrides image cmd", func() {
dockerfile := `FROM docker.io/library/alpine:latest dockerfile := `FROM quay.io/libpod/alpine:latest
CMD [ "-v"] CMD [ "-v"]
ENTRYPOINT ["grep", "Alpine", "/etc/os-release"] ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]
` `
@ -79,7 +79,7 @@ ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]
}) })
It("podman run entrypoint with user cmd no image cmd", func() { It("podman run entrypoint with user cmd no image cmd", func() {
dockerfile := `FROM docker.io/library/alpine:latest dockerfile := `FROM quay.io/libpod/alpine:latest
ENTRYPOINT ["grep", "Alpine", "/etc/os-release"] ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]
` `
podmanTest.BuildImage(dockerfile, "foobar.com/entrypoint:latest", "false") podmanTest.BuildImage(dockerfile, "foobar.com/entrypoint:latest", "false")
@ -91,7 +91,7 @@ ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]
It("podman run user entrypoint overrides image entrypoint and image cmd", func() { It("podman run user entrypoint overrides image entrypoint and image cmd", func() {
SkipIfRemote("FIXME: podman-remote not handling passing --entrypoint=\"\" flag correctly") SkipIfRemote("FIXME: podman-remote not handling passing --entrypoint=\"\" flag correctly")
dockerfile := `FROM docker.io/library/alpine:latest dockerfile := `FROM quay.io/libpod/alpine:latest
CMD ["-i"] CMD ["-i"]
ENTRYPOINT ["grep", "Alpine", "/etc/os-release"] ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]
` `
@ -108,7 +108,7 @@ ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]
}) })
It("podman run user entrypoint with command overrides image entrypoint and image cmd", func() { It("podman run user entrypoint with command overrides image entrypoint and image cmd", func() {
dockerfile := `FROM docker.io/library/alpine:latest dockerfile := `FROM quay.io/libpod/alpine:latest
CMD ["-i"] CMD ["-i"]
ENTRYPOINT ["grep", "Alpine", "/etc/os-release"] ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]
` `

View File

@ -134,7 +134,7 @@ var _ = Describe("Podman save", func() {
defer os.Setenv("GNUPGHOME", origGNUPGHOME) defer os.Setenv("GNUPGHOME", origGNUPGHOME)
port := 5000 port := 5000
session := podmanTest.Podman([]string{"run", "-d", "--name", "registry", "-p", strings.Join([]string{strconv.Itoa(port), strconv.Itoa(port)}, ":"), "docker.io/registry:2.6"}) session := podmanTest.Podman([]string{"run", "-d", "--name", "registry", "-p", strings.Join([]string{strconv.Itoa(port), strconv.Itoa(port)}, ":"), "quay.io/libpod/registry:2.6"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0)) Expect(session.ExitCode()).To(Equal(0))
if !WaitContainerReady(podmanTest, "registry", "listening on", 20, 1) { if !WaitContainerReady(podmanTest, "registry", "listening on", 20, 1) {

View File

@ -59,7 +59,7 @@ WantedBy=multi-user.target
Expect(stop.ExitCode()).To(Equal(0)) Expect(stop.ExitCode()).To(Equal(0))
}() }()
create := podmanTest.Podman([]string{"create", "--name", "redis", "redis"}) create := podmanTest.Podman([]string{"create", "--name", "redis", redis})
create.WaitWithDefaultTimeout() create.WaitWithDefaultTimeout()
Expect(create.ExitCode()).To(Equal(0)) Expect(create.ExitCode()).To(Equal(0))

View File

@ -41,7 +41,7 @@ var _ = Describe("Podman tag", func() {
results.WaitWithDefaultTimeout() results.WaitWithDefaultTimeout()
Expect(results.ExitCode()).To(Equal(0)) Expect(results.ExitCode()).To(Equal(0))
inspectData := results.InspectImageJSON() inspectData := results.InspectImageJSON()
Expect(StringInSlice("docker.io/library/alpine:latest", inspectData[0].RepoTags)).To(BeTrue()) Expect(StringInSlice("quay.io/libpod/alpine:latest", inspectData[0].RepoTags)).To(BeTrue())
Expect(StringInSlice("localhost/foobar:latest", inspectData[0].RepoTags)).To(BeTrue()) Expect(StringInSlice("localhost/foobar:latest", inspectData[0].RepoTags)).To(BeTrue())
}) })
@ -54,7 +54,7 @@ var _ = Describe("Podman tag", func() {
results.WaitWithDefaultTimeout() results.WaitWithDefaultTimeout()
Expect(results.ExitCode()).To(Equal(0)) Expect(results.ExitCode()).To(Equal(0))
inspectData := results.InspectImageJSON() inspectData := results.InspectImageJSON()
Expect(StringInSlice("docker.io/library/alpine:latest", inspectData[0].RepoTags)).To(BeTrue()) Expect(StringInSlice("quay.io/libpod/alpine:latest", inspectData[0].RepoTags)).To(BeTrue())
Expect(StringInSlice("localhost/foobar:latest", inspectData[0].RepoTags)).To(BeTrue()) Expect(StringInSlice("localhost/foobar:latest", inspectData[0].RepoTags)).To(BeTrue())
}) })
@ -67,7 +67,7 @@ var _ = Describe("Podman tag", func() {
results.WaitWithDefaultTimeout() results.WaitWithDefaultTimeout()
Expect(results.ExitCode()).To(Equal(0)) Expect(results.ExitCode()).To(Equal(0))
inspectData := results.InspectImageJSON() inspectData := results.InspectImageJSON()
Expect(StringInSlice("docker.io/library/alpine:latest", inspectData[0].RepoTags)).To(BeTrue()) Expect(StringInSlice("quay.io/libpod/alpine:latest", inspectData[0].RepoTags)).To(BeTrue())
Expect(StringInSlice("localhost/foobar:new", inspectData[0].RepoTags)).To(BeTrue()) Expect(StringInSlice("localhost/foobar:new", inspectData[0].RepoTags)).To(BeTrue())
}) })

View File

@ -35,7 +35,7 @@ var _ = Describe("Podman image tree", func() {
It("podman image tree", func() { It("podman image tree", func() {
SkipIfRemote("Does not work on remote client") SkipIfRemote("Does not work on remote client")
dockerfile := `FROM docker.io/library/busybox:latest dockerfile := `FROM quay.io/libpod/busybox:latest
RUN mkdir hello RUN mkdir hello
RUN touch test.txt RUN touch test.txt
ENV foo=bar ENV foo=bar
@ -45,14 +45,14 @@ ENV foo=bar
session := podmanTest.PodmanNoCache([]string{"image", "tree", "test:latest"}) session := podmanTest.PodmanNoCache([]string{"image", "tree", "test:latest"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0)) Expect(session.ExitCode()).To(Equal(0))
session = podmanTest.PodmanNoCache([]string{"image", "tree", "--whatrequires", "docker.io/library/busybox:latest"}) session = podmanTest.PodmanNoCache([]string{"image", "tree", "--whatrequires", "quay.io/libpod/busybox:latest"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0)) Expect(session.ExitCode()).To(Equal(0))
session = podmanTest.PodmanNoCache([]string{"rmi", "test:latest"}) session = podmanTest.PodmanNoCache([]string{"rmi", "test:latest"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0)) Expect(session.ExitCode()).To(Equal(0))
session = podmanTest.PodmanNoCache([]string{"rmi", "docker.io/library/busybox:latest"}) session = podmanTest.PodmanNoCache([]string{"rmi", "quay.io/libpod/busybox:latest"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0)) Expect(session.ExitCode()).To(Equal(0))
}) })

View File

@ -302,12 +302,7 @@ func (s *PodmanSession) LineInOutputContains(term string) bool {
// by podman-images(1). // by podman-images(1).
func (s *PodmanSession) LineInOutputContainsTag(repo, tag string) bool { func (s *PodmanSession) LineInOutputContainsTag(repo, tag string) bool {
tagMap := tagOutputToMap(s.OutputToStringArray()) tagMap := tagOutputToMap(s.OutputToStringArray())
for r, t := range tagMap { return tagMap[repo][tag]
if repo == r && tag == t {
return true
}
}
return false
} }
// IsJSONOutputValid attempts to unmarshal the session buffer // IsJSONOutputValid attempts to unmarshal the session buffer
@ -366,10 +361,11 @@ func StringInSlice(s string, sl []string) bool {
} }
// tagOutPutToMap parses each string in imagesOutput and returns // tagOutPutToMap parses each string in imagesOutput and returns
// a map of repo:tag pairs. Notice, the first array item will // a map whose key is a repo, and value is another map whose keys
// are the tags found for that repo. Notice, the first array item will
// be skipped as it's considered to be the header. // be skipped as it's considered to be the header.
func tagOutputToMap(imagesOutput []string) map[string]string { func tagOutputToMap(imagesOutput []string) map[string]map[string]bool {
m := make(map[string]string) m := make(map[string]map[string]bool)
// iterate over output but skip the header // iterate over output but skip the header
for _, i := range imagesOutput[1:] { for _, i := range imagesOutput[1:] {
tmp := []string{} tmp := []string{}
@ -383,7 +379,10 @@ func tagOutputToMap(imagesOutput []string) map[string]string {
if len(tmp) < 2 { if len(tmp) < 2 {
continue continue
} }
m[tmp[0]] = tmp[1] if m[tmp[0]] == nil {
m[tmp[0]] = map[string]bool{}
}
m[tmp[0]][tmp[1]] = true
} }
return m return m
} }