From 345c85e77f22c4cbd5bbf34f15f82ec17a86ecc8 Mon Sep 17 00:00:00 2001 From: Hank Donnay Date: Thu, 8 Feb 2024 09:21:17 -0600 Subject: [PATCH] dockerfile: port tests to txtar This makes things much simpler, IMO. Signed-off-by: Hank Donnay --- rhel/dockerfile/dockerfile_test.go | 68 ++++++++-------- rhel/dockerfile/fuzz_test.go | 25 +++++- .../{Dockerfile-Comments => Comments.txtar} | 6 ++ .../testdata/Dockerfile-Comments.want | 4 - .../testdata/Dockerfile-InvalidLabel | 2 - .../testdata/Dockerfile-InvalidLabel.want | 4 - .../testdata/Dockerfile-InvalidLabel.want.err | 1 - .../testdata/Dockerfile-etcd-rhel7.want | 15 ---- .../testdata/Dockerfile-issue526.want | 3 - .../testdata/Dockerfile-nodejs10.want | 20 ----- .../Dockerfile-quay-quay-rhel8-v3.5.6-4.want | 21 ----- ...e-rhscl-redis-5-rhel7-5-53.1634738116.want | 23 ------ ...Dockerfile-rhscl-s2i-core-rhel7-1-235.want | 21 ----- .../testdata/Dockerfile-ubi7-7.9-516.want | 20 ----- .../Dockerfile-ubi8-minimal-8.4-208.want | 22 ------ rhel/dockerfile/testdata/InvalidLabel.txtar | 4 + .../{Dockerfile-issue526 => Issue526.txtar} | 5 ++ ...Dockerfile-etcd-rhel7 => etcd-rhel7.txtar} | 18 ++++- ...14cac1d07507ec629a0b510b694efbb77bf06aedbc | 2 - ...6d3d8c03cf65d66ea4da27266e7d71c203d6aa7757 | 2 - ...c3af76fb2f3a6cf8d18aa86f32d8ac1f0e10a13941 | 2 - ...5a79fc6cb5e9fd4078a4564f6bf41e3dff6db41d2f | 2 - ...44443ce80aba4c870749a8646e569e0ed7aa5f0edb | 2 - ...7223a48df920edcd7d9eb22eb85f26b81f853675a3 | 2 - ...2df14923bfd386fbc800b4cf21ac8033761770cf04 | 2 - ...011e8943d313f8c1dcbbc3689b9b20dcc97ea3814d | 2 - .../{Dockerfile-nodejs10 => nodejs10.txtar} | 22 ++++++ ...3.5.6-4 => quay-quay-rhel8-v3.5.6-4.txtar} | 23 ++++++ ...rhscl-redis-5-rhel7-5-53.1634738116.txtar} | 25 ++++++ ...1-235 => rhscl-s2i-core-rhel7-1-235.txtar} | 23 ++++++ ...Dockerfile-ubi7-7.9-516 => ubi7-7.9.txtar} | 22 ++++++ ...mal-8.4-208 => ubi8-minimal-8.4-208.txtar} | 78 ++++++++++++------- 32 files changed, 254 insertions(+), 237 deletions(-) rename rhel/dockerfile/testdata/{Dockerfile-Comments => Comments.txtar} (76%) delete mode 100644 rhel/dockerfile/testdata/Dockerfile-Comments.want delete mode 100644 rhel/dockerfile/testdata/Dockerfile-InvalidLabel delete mode 100644 rhel/dockerfile/testdata/Dockerfile-InvalidLabel.want delete mode 100644 rhel/dockerfile/testdata/Dockerfile-InvalidLabel.want.err delete mode 100644 rhel/dockerfile/testdata/Dockerfile-etcd-rhel7.want delete mode 100644 rhel/dockerfile/testdata/Dockerfile-issue526.want delete mode 100644 rhel/dockerfile/testdata/Dockerfile-nodejs10.want delete mode 100644 rhel/dockerfile/testdata/Dockerfile-quay-quay-rhel8-v3.5.6-4.want delete mode 100644 rhel/dockerfile/testdata/Dockerfile-rhscl-redis-5-rhel7-5-53.1634738116.want delete mode 100644 rhel/dockerfile/testdata/Dockerfile-rhscl-s2i-core-rhel7-1-235.want delete mode 100644 rhel/dockerfile/testdata/Dockerfile-ubi7-7.9-516.want delete mode 100644 rhel/dockerfile/testdata/Dockerfile-ubi8-minimal-8.4-208.want create mode 100644 rhel/dockerfile/testdata/InvalidLabel.txtar rename rhel/dockerfile/testdata/{Dockerfile-issue526 => Issue526.txtar} (52%) rename rhel/dockerfile/testdata/{Dockerfile-etcd-rhel7 => etcd-rhel7.txtar} (60%) delete mode 100644 rhel/dockerfile/testdata/fuzz/FuzzLex/1f3dc577a1373f0294c8c914cac1d07507ec629a0b510b694efbb77bf06aedbc delete mode 100644 rhel/dockerfile/testdata/fuzz/FuzzLex/44d812f0623961c44832d76d3d8c03cf65d66ea4da27266e7d71c203d6aa7757 delete mode 100644 rhel/dockerfile/testdata/fuzz/FuzzLex/5d9409a7fb62c67dc82a7ec3af76fb2f3a6cf8d18aa86f32d8ac1f0e10a13941 delete mode 100644 rhel/dockerfile/testdata/fuzz/FuzzLex/7d0554d5c273741f5c70d45a79fc6cb5e9fd4078a4564f6bf41e3dff6db41d2f delete mode 100644 rhel/dockerfile/testdata/fuzz/FuzzLex/8a4f9ec44aa389844ede8344443ce80aba4c870749a8646e569e0ed7aa5f0edb delete mode 100644 rhel/dockerfile/testdata/fuzz/FuzzLex/a80c4576f57f0126dcd6877223a48df920edcd7d9eb22eb85f26b81f853675a3 delete mode 100644 rhel/dockerfile/testdata/fuzz/FuzzLex/cf56de3b7b19f8820b18632df14923bfd386fbc800b4cf21ac8033761770cf04 delete mode 100644 rhel/dockerfile/testdata/fuzz/FuzzLex/d552ebffd8434d619cd4f4011e8943d313f8c1dcbbc3689b9b20dcc97ea3814d rename rhel/dockerfile/testdata/{Dockerfile-nodejs10 => nodejs10.txtar} (64%) rename rhel/dockerfile/testdata/{Dockerfile-quay-quay-rhel8-v3.5.6-4 => quay-quay-rhel8-v3.5.6-4.txtar} (87%) rename rhel/dockerfile/testdata/{Dockerfile-rhscl-redis-5-rhel7-5-53.1634738116 => rhscl-redis-5-rhel7-5-53.1634738116.txtar} (64%) rename rhel/dockerfile/testdata/{Dockerfile-rhscl-s2i-core-rhel7-1-235 => rhscl-s2i-core-rhel7-1-235.txtar} (74%) rename rhel/dockerfile/testdata/{Dockerfile-ubi7-7.9-516 => ubi7-7.9.txtar} (54%) rename rhel/dockerfile/testdata/{Dockerfile-ubi8-minimal-8.4-208 => ubi8-minimal-8.4-208.txtar} (54%) diff --git a/rhel/dockerfile/dockerfile_test.go b/rhel/dockerfile/dockerfile_test.go index 419c19eae..7db19f5a1 100644 --- a/rhel/dockerfile/dockerfile_test.go +++ b/rhel/dockerfile/dockerfile_test.go @@ -4,60 +4,56 @@ import ( "bytes" "context" "encoding/json" - "io/fs" - "os" + "path/filepath" "strings" "testing" "github.com/google/go-cmp/cmp" + "golang.org/x/tools/txtar" ) func TestGetLabels(t *testing.T) { + var errPrefix = []byte("error:") ctx := context.Background() - td := os.DirFS("testdata") - de, err := fs.ReadDir(td, ".") + + ms, err := filepath.Glob("testdata/*.txtar") if err != nil { t.Fatal(err) } - for _, de := range de { - n := de.Name() - if !strings.HasPrefix(n, "Dockerfile") || - strings.HasSuffix(n, ".want") || - strings.HasSuffix(n, ".want.err") { - continue - } - t.Run(n, func(t *testing.T) { - f, err := td.Open(n) + for _, m := range ms { + t.Run(strings.TrimSuffix(filepath.Base(m), filepath.Ext(m)), func(t *testing.T) { + ar, err := txtar.ParseFile(m) if err != nil { - t.Fatal(err) + t.Fatalf("error parsing archive: %v", err) } - defer f.Close() - w, err := td.Open(n + ".want") - if err != nil { - t.Fatal(err) - } - defer w.Close() - wantErr, _ := fs.ReadFile(td, n+".want.err") - want := make(map[string]string) - if err := json.NewDecoder(w).Decode(&want); err != nil { - t.Error(err) - } - got, err := GetLabels(ctx, f) - if len(wantErr) == 0 { - if err != nil { - t.Error(err) - } - } else { - if err == nil { - t.Error("got nil, wanted error") - } else { - if got, want := err.Error(), string(bytes.TrimSpace(wantErr)); got != want { - t.Errorf("got: %+#q, want: %+#q", got, want) + var got, want map[string]string + wantErr := bytes.HasPrefix(ar.Comment, errPrefix) + for _, f := range ar.Files { + switch f.Name { + case "Dockerfile": + got, err = GetLabels(ctx, bytes.NewReader(f.Data)) + case "Want": + want = make(map[string]string) + if err := json.Unmarshal(f.Data, &want); err != nil { + t.Fatalf("unmarshaling wanted values: %v", err) } + default: + t.Logf("skipping unknown file: %s", f.Name) } } + if wantErr { + got := err.Error() + want := string(bytes.TrimSpace(bytes.TrimPrefix(ar.Comment, errPrefix))) + if got != want { + t.Error(cmp.Diff(got, want)) + } + return + } + if err != nil { + t.Errorf("error parsing labels: %v", err) + } if !cmp.Equal(got, want) { t.Error(cmp.Diff(got, want)) } diff --git a/rhel/dockerfile/fuzz_test.go b/rhel/dockerfile/fuzz_test.go index b1afce4f1..8b5dfe9dc 100644 --- a/rhel/dockerfile/fuzz_test.go +++ b/rhel/dockerfile/fuzz_test.go @@ -2,10 +2,31 @@ package dockerfile import ( "bytes" + "path/filepath" "testing" + + "golang.org/x/tools/txtar" ) func FuzzLex(f *testing.F) { + ms, err := filepath.Glob("testdata/*.txtar") + if err != nil { + f.Fatal(err) + } + for _, m := range ms { + ar, err := txtar.ParseFile(m) + if err != nil { + f.Fatalf("error parsing archive: %v", err) + } + File: + for _, af := range ar.Files { + if af.Name == "Dockerfile" { + f.Add(af.Data) + break File + } + } + } + f.Fuzz(func(t *testing.T, b []byte) { l := newLexer() l.Reset(bytes.NewReader(b)) @@ -22,4 +43,6 @@ func FuzzLex(f *testing.F) { }) } -//go:generate sh -c "go run golang.org/x/tools/cmd/file2fuzz -o testdata/fuzz/FuzzLex $(ls -1 testdata/Dockerfile* | grep -v [.]want)" +// To add new files to the fuzz corpus: +// +// go run golang.org/x/tools/cmd/file2fuzz -o testdata/fuzz/FuzzLex [FILE] diff --git a/rhel/dockerfile/testdata/Dockerfile-Comments b/rhel/dockerfile/testdata/Comments.txtar similarity index 76% rename from rhel/dockerfile/testdata/Dockerfile-Comments rename to rhel/dockerfile/testdata/Comments.txtar index c49db4575..38b6c4373 100644 --- a/rhel/dockerfile/testdata/Dockerfile-Comments +++ b/rhel/dockerfile/testdata/Comments.txtar @@ -1,3 +1,4 @@ +-- Dockerfile -- # Normal comments are fine FROM scratch @@ -7,3 +8,8 @@ LABEL \ C=D # This comment is stripped despite the apparent continuation +-- Want -- +{ + "A": "B", + "C": "D" +} diff --git a/rhel/dockerfile/testdata/Dockerfile-Comments.want b/rhel/dockerfile/testdata/Dockerfile-Comments.want deleted file mode 100644 index 6a87d4ec9..000000000 --- a/rhel/dockerfile/testdata/Dockerfile-Comments.want +++ /dev/null @@ -1,4 +0,0 @@ -{ - "A": "B", - "C": "D" -} diff --git a/rhel/dockerfile/testdata/Dockerfile-InvalidLabel b/rhel/dockerfile/testdata/Dockerfile-InvalidLabel deleted file mode 100644 index aac0f91bf..000000000 --- a/rhel/dockerfile/testdata/Dockerfile-InvalidLabel +++ /dev/null @@ -1,2 +0,0 @@ -LABEL A=B \ - C=D # Comments not allowed in this position diff --git a/rhel/dockerfile/testdata/Dockerfile-InvalidLabel.want b/rhel/dockerfile/testdata/Dockerfile-InvalidLabel.want deleted file mode 100644 index 6a87d4ec9..000000000 --- a/rhel/dockerfile/testdata/Dockerfile-InvalidLabel.want +++ /dev/null @@ -1,4 +0,0 @@ -{ - "A": "B", - "C": "D" -} diff --git a/rhel/dockerfile/testdata/Dockerfile-InvalidLabel.want.err b/rhel/dockerfile/testdata/Dockerfile-InvalidLabel.want.err deleted file mode 100644 index cd81a4f82..000000000 --- a/rhel/dockerfile/testdata/Dockerfile-InvalidLabel.want.err +++ /dev/null @@ -1 +0,0 @@ -invalid assignment syntax: `A=B C=D # Comments not allowed in this position` diff --git a/rhel/dockerfile/testdata/Dockerfile-etcd-rhel7.want b/rhel/dockerfile/testdata/Dockerfile-etcd-rhel7.want deleted file mode 100644 index 81fc0db41..000000000 --- a/rhel/dockerfile/testdata/Dockerfile-etcd-rhel7.want +++ /dev/null @@ -1,15 +0,0 @@ -{ - "com.redhat.component": "etcd-container", - "description": "etcd is a distributed reliable key-value store for the most critical data of a distributed system.", - "install": "/usr/bin/docker run --rm $OPT1 --privileged -v /:/host -e HOST=/host -e NAME=$NAME -e IMAGE=$IMAGE $IMAGE $OPT2 /usr/bin/install.sh $OPT3", - "io.k8s.description": "etcd is a distributed reliable key-value store for the most critical data of a distributed system.", - "io.k8s.display-name": "etcd", - "io.openshift.expose-services": "2379:tcp,2380:tcp", - "io.openshift.tags": "etcd", - "name": "rhel7/etcd", - "run": "/usr/bin/docker run -d $OPT1 -p 4001:4001 -p 7001:7001 -p 2379:2379 -p 2380:2380 --name $NAME $IMAGE $OPT2 $OPT3", - "summary": "A highly-available key value store for shared configuration", - "uninstall": "/usr/bin/docker run --rm $OPT1 --privileged -v /:/host -e HOST=/host -e NAME=$NAME -e IMAGE=$IMAGE $IMAGE $OPT2 /usr/bin/uninstall.sh $OPT3", - "usage": "etcd -help ", - "version": "3.2.32" -} diff --git a/rhel/dockerfile/testdata/Dockerfile-issue526.want b/rhel/dockerfile/testdata/Dockerfile-issue526.want deleted file mode 100644 index f702dd2d5..000000000 --- a/rhel/dockerfile/testdata/Dockerfile-issue526.want +++ /dev/null @@ -1,3 +0,0 @@ -{ - "label": "B C E" -} diff --git a/rhel/dockerfile/testdata/Dockerfile-nodejs10.want b/rhel/dockerfile/testdata/Dockerfile-nodejs10.want deleted file mode 100644 index 476bdb249..000000000 --- a/rhel/dockerfile/testdata/Dockerfile-nodejs10.want +++ /dev/null @@ -1,20 +0,0 @@ -{ - "com.redhat.component": "nodejs-10-container", - "com.redhat.deployments-dir": "/src", - "com.redhat.dev-mode": "DEV_MODE:false", - "com.redhat.dev-mode.port": "DEBUG_PORT:5858", - "com.redhat.license_terms": "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI", - "description": "Node.js 10 available as container is a base platform for building and running various Node.js 10 applications and frameworks. Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.", - "help": "For more information visit https://github.com/sclorg/s2i-nodejs-container", - "io.k8s.description": "Node.js 10 available as container is a base platform for building and running various Node.js 10 applications and frameworks. Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.", - "io.k8s.display-name": "Node.js 10", - "io.openshift.expose-services": "8080:http", - "io.openshift.s2i.scripts-url": "image:///usr/libexec/s2i", - "io.openshift.tags": "builder,nodejs,nodejs10", - "io.s2i.scripts-url": "image:///usr/libexec/s2i", - "maintainer": "SoftwareCollections.org ", - "name": "ubi8/10", - "summary": "Platform for building and running Node.js 10 applications", - "usage": "s2i build ubi8/10:latest ", - "version": "1" -} diff --git a/rhel/dockerfile/testdata/Dockerfile-quay-quay-rhel8-v3.5.6-4.want b/rhel/dockerfile/testdata/Dockerfile-quay-quay-rhel8-v3.5.6-4.want deleted file mode 100644 index 4bd0587b1..000000000 --- a/rhel/dockerfile/testdata/Dockerfile-quay-quay-rhel8-v3.5.6-4.want +++ /dev/null @@ -1,21 +0,0 @@ -{ - "com.redhat.component": "quay-registry-container", - "name": "quay/quay-rhel8", - "version": "v3.5.6", - "io.k8s.display-name": "Red Hat Quay", - "io.k8s.description": "Red Hat Quay", - "summary": "Red Hat Quay", - "maintainer": "support@redhat.com", - "io.openshift.tags": "quay", - "release": "4", - "com.redhat.license_terms": "https://www.redhat.com/agreements", - "distribution-scope": "public", - "vendor": "Red Hat, Inc.", - "build-date": "2021-08-17T21:16:14.144538", - "architecture": "x86_64", - "vcs-type": "git", - "vcs-ref": "0e033c625b6a775f5be730ce5a938aa91cc46d29", - "com.redhat.build-host": "example.com", - "description": "Red Hat Quay", - "url": "https://access.redhat.com/containers/#/registry.access.redhat.com/quay/quay-rhel8/images/v3.5.6-4" -} diff --git a/rhel/dockerfile/testdata/Dockerfile-rhscl-redis-5-rhel7-5-53.1634738116.want b/rhel/dockerfile/testdata/Dockerfile-rhscl-redis-5-rhel7-5-53.1634738116.want deleted file mode 100644 index 79ea68de6..000000000 --- a/rhel/dockerfile/testdata/Dockerfile-rhscl-redis-5-rhel7-5-53.1634738116.want +++ /dev/null @@ -1,23 +0,0 @@ -{ - "architecture": "x86_64", - "build-date": "2021-10-20T13:56:03.899740", - "com.redhat.build-host": "cpt-1007.osbs.prod.upshift.rdu2.redhat.com", - "com.redhat.component": "rh-redis5-container", - "com.redhat.license_terms": "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#rhel", - "description": "Redis 5 available as container, is an advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets. You can run atomic operations on these types, like appending to a string; incrementing the value in a hash; pushing to a list; computing set intersection, union and difference; or getting the member with highest ranking in a sorted set. In order to achieve its outstanding performance, Redis works with an in-memory dataset. Depending on your use case, you can persist it either by dumping the dataset to disk every once in a while, or by appending each command to a log.", - "distribution-scope": "public", - "io.k8s.description": "Redis 5 available as container, is an advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets. You can run atomic operations on these types, like appending to a string; incrementing the value in a hash; pushing to a list; computing set intersection, union and difference; or getting the member with highest ranking in a sorted set. In order to achieve its outstanding performance, Redis works with an in-memory dataset. Depending on your use case, you can persist it either by dumping the dataset to disk every once in a while, or by appending each command to a log.", - "io.k8s.display-name": "Redis 5", - "io.openshift.expose-services": "6379:redis", - "io.openshift.tags": "database,redis,redis5,rh-redis5", - "maintainer": "SoftwareCollections.org ", - "name": "rhscl/redis-5-rhel7", - "release": "53.1634738116", - "summary": "Redis in-memory data structure store, used as database, cache and message broker", - "url": "https://access.redhat.com/containers/#/registry.access.redhat.com/rhscl/redis-5-rhel7/images/5-53.1634738116", - "usage": "podman run -d --name redis_database -p 6379:6379 rhscl/redis-5-rhel7", - "vcs-ref": "1ca08b535089c4828147120ead2699d9f237260a", - "vcs-type": "git", - "vendor": "Red Hat, Inc.", - "version": "5" -} diff --git a/rhel/dockerfile/testdata/Dockerfile-rhscl-s2i-core-rhel7-1-235.want b/rhel/dockerfile/testdata/Dockerfile-rhscl-s2i-core-rhel7-1-235.want deleted file mode 100644 index 05be1b3da..000000000 --- a/rhel/dockerfile/testdata/Dockerfile-rhscl-s2i-core-rhel7-1-235.want +++ /dev/null @@ -1,21 +0,0 @@ -{ - "architecture": "x86_64", - "build-date": "2021-10-06T13:08:17.304497", - "com.redhat.build-host": "cpt-1005.osbs.prod.upshift.rdu2.redhat.com", - "com.redhat.component": "s2i-core-container", - "com.redhat.license_terms": "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI", - "description": "The s2i-core image provides any images layered on top of it with all the tools needed to use source-to-image functionality while keeping the image size as small as possible.", - "distribution-scope": "public", - "io.k8s.description": "The s2i-core image provides any images layered on top of it with all the tools needed to use source-to-image functionality while keeping the image size as small as possible.", - "io.k8s.display-name": "s2i core", - "io.openshift.s2i.scripts-url": "image:///usr/libexec/s2i", - "io.s2i.scripts-url": "image:///usr/libexec/s2i", - "name": "rhscl/s2i-core-rhel7", - "release": "235", - "summary": "Base image which allows using of source-to-image.", - "url": "https://access.redhat.com/containers/#/registry.access.redhat.com/rhscl/s2i-core-rhel7/images/1-235", - "vcs-ref": "7fb31fe42247120f04b5e2d94f1719411f1037e8", - "vcs-type": "git", - "vendor": "Red Hat, Inc.", - "version": "1" -} diff --git a/rhel/dockerfile/testdata/Dockerfile-ubi7-7.9-516.want b/rhel/dockerfile/testdata/Dockerfile-ubi7-7.9-516.want deleted file mode 100644 index e71036221..000000000 --- a/rhel/dockerfile/testdata/Dockerfile-ubi7-7.9-516.want +++ /dev/null @@ -1,20 +0,0 @@ -{ - "architecture": "x86_64", - "build-date": "2021-10-05T10:17:02.802845", - "com.redhat.build-host": "cpt-1007.osbs.prod.upshift.rdu2.redhat.com", - "com.redhat.component": "ubi7-container", - "com.redhat.license_terms": "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI", - "description": "The Universal Base Image is designed and engineered to be the base layer for all of your containerized applications, middleware and utilities. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly.", - "distribution-scope": "public", - "io.k8s.description": "The Universal Base Image is designed and engineered to be the base layer for all of your containerized applications, middleware and utilities. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly.", - "io.k8s.display-name": "Red Hat Universal Base Image 7", - "io.openshift.tags": "base rhel7", - "name": "ubi7", - "release": "516", - "summary": "Provides the latest release of the Red Hat Universal Base Image 7.", - "url": "https://access.redhat.com/containers/#/registry.access.redhat.com/ubi7/images/7.9-516", - "vcs-ref": "a4e710a688a6374670ecdd56637c3f683d11cbe3", - "vcs-type": "git", - "vendor": "Red Hat, Inc.", - "version": "7.9" -} diff --git a/rhel/dockerfile/testdata/Dockerfile-ubi8-minimal-8.4-208.want b/rhel/dockerfile/testdata/Dockerfile-ubi8-minimal-8.4-208.want deleted file mode 100644 index ab1b3fc65..000000000 --- a/rhel/dockerfile/testdata/Dockerfile-ubi8-minimal-8.4-208.want +++ /dev/null @@ -1,22 +0,0 @@ -{ - "architecture": "x86_64", - "build-date": "2021-08-03T16:57:21.054109", - "com.redhat.build-host": "cpt-1002.osbs.prod.upshift.rdu2.redhat.com", - "distribution-scope": "public", - "io.k8s.description": "The Universal Base Image Minimal is a stripped down image that uses microdnf as a package manager. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly.", - "release": "208", - "url": "https://access.redhat.com/containers/#/registry.access.redhat.com/ubi8-minimal/images/8.4-208", - "vcs-ref": "7256039d3c371a38cf13906dcf5688c19700c73b", - "vcs-type": "git", - "vendor": "Red Hat, Inc.", - "com.redhat.component": "ubi8-minimal-container", - "com.redhat.license_terms": "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI", - "description": "The Universal Base Image Minimal is a stripped down image that uses microdnf as a package manager. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly.", - "io.k8s.display-name": "Red Hat Universal Base Image 8 Minimal", - "io.openshift.expose-services": "", - "io.openshift.tags": "minimal rhel8", - "maintainer": "Red Hat, Inc.", - "name": "ubi8-minimal", - "summary": "Provides the latest release of the minimal Red Hat Universal Base Image 8.", - "version": "8.4" -} diff --git a/rhel/dockerfile/testdata/InvalidLabel.txtar b/rhel/dockerfile/testdata/InvalidLabel.txtar new file mode 100644 index 000000000..96958a192 --- /dev/null +++ b/rhel/dockerfile/testdata/InvalidLabel.txtar @@ -0,0 +1,4 @@ +error: invalid assignment syntax: `A=B C=D # Comments not allowed in this position` +-- Dockerfile -- +LABEL A=B \ + C=D # Comments not allowed in this position diff --git a/rhel/dockerfile/testdata/Dockerfile-issue526 b/rhel/dockerfile/testdata/Issue526.txtar similarity index 52% rename from rhel/dockerfile/testdata/Dockerfile-issue526 rename to rhel/dockerfile/testdata/Issue526.txtar index 063f88e6a..350dde74e 100644 --- a/rhel/dockerfile/testdata/Dockerfile-issue526 +++ b/rhel/dockerfile/testdata/Issue526.txtar @@ -1,6 +1,11 @@ +-- Dockerfile -- FROM scratch ENV A="B C" \ D=E LABEL label="$A $D" +-- Want -- +{ + "label": "B C E" +} diff --git a/rhel/dockerfile/testdata/Dockerfile-etcd-rhel7 b/rhel/dockerfile/testdata/etcd-rhel7.txtar similarity index 60% rename from rhel/dockerfile/testdata/Dockerfile-etcd-rhel7 rename to rhel/dockerfile/testdata/etcd-rhel7.txtar index 13727a546..7fb4ddbba 100644 --- a/rhel/dockerfile/testdata/Dockerfile-etcd-rhel7 +++ b/rhel/dockerfile/testdata/etcd-rhel7.txtar @@ -1,3 +1,4 @@ +-- Dockerfile -- FROM registry.stage.redhat.io/rhel7/rhel:7.9 ENV container=docker @@ -29,4 +30,19 @@ EXPOSE 4001 7001 2379 2380 ADD tmpfiles.template config.json.template service.template manifest.json /exports/ CMD ["/usr/bin/etcd-env.sh", "/usr/bin/etcd"] - +-- Want -- +{ + "com.redhat.component": "etcd-container", + "description": "etcd is a distributed reliable key-value store for the most critical data of a distributed system.", + "install": "/usr/bin/docker run --rm $OPT1 --privileged -v /:/host -e HOST=/host -e NAME=$NAME -e IMAGE=$IMAGE $IMAGE $OPT2 /usr/bin/install.sh $OPT3", + "io.k8s.description": "etcd is a distributed reliable key-value store for the most critical data of a distributed system.", + "io.k8s.display-name": "etcd", + "io.openshift.expose-services": "2379:tcp,2380:tcp", + "io.openshift.tags": "etcd", + "name": "rhel7/etcd", + "run": "/usr/bin/docker run -d $OPT1 -p 4001:4001 -p 7001:7001 -p 2379:2379 -p 2380:2380 --name $NAME $IMAGE $OPT2 $OPT3", + "summary": "A highly-available key value store for shared configuration", + "uninstall": "/usr/bin/docker run --rm $OPT1 --privileged -v /:/host -e HOST=/host -e NAME=$NAME -e IMAGE=$IMAGE $IMAGE $OPT2 /usr/bin/uninstall.sh $OPT3", + "usage": "etcd -help ", + "version": "3.2.32" +} diff --git a/rhel/dockerfile/testdata/fuzz/FuzzLex/1f3dc577a1373f0294c8c914cac1d07507ec629a0b510b694efbb77bf06aedbc b/rhel/dockerfile/testdata/fuzz/FuzzLex/1f3dc577a1373f0294c8c914cac1d07507ec629a0b510b694efbb77bf06aedbc deleted file mode 100644 index bf2e58e1d..000000000 --- a/rhel/dockerfile/testdata/fuzz/FuzzLex/1f3dc577a1373f0294c8c914cac1d07507ec629a0b510b694efbb77bf06aedbc +++ /dev/null @@ -1,2 +0,0 @@ -go test fuzz v1 -[]byte("FROM ubi8/s2i-base:rhel8.1\n\n# This image provides a Node.JS environment you can use to run your Node.JS\n# applications.\n\nEXPOSE 8080\n\n# Add $HOME/node_modules/.bin to the $PATH, allowing user to make npm scripts\n# available on the CLI without using npm's --global installation mode\n# This image will be initialized with \"npm run $NPM_RUN\"\n# See https://docs.npmjs.com/misc/scripts, and your repo's package.json\n# file for possible values of NPM_RUN\n# Description\n# Environment:\n# * $NPM_RUN - Select an alternate / custom runtime mode, defined in your package.json files' scripts section (default: npm run \"start\").\n# Expose ports:\n# * 8080 - Unprivileged port used by nodejs application\n\nENV NODEJS_VERSION=10 \\\n NPM_RUN=start \\\n NAME=nodejs \\\n NPM_CONFIG_PREFIX=$HOME/.npm-global \\\n PATH=$HOME/node_modules/.bin/:$HOME/.npm-global/bin/:$PATH\n\nENV SUMMARY=\"Platform for building and running Node.js $NODEJS_VERSION applications\" \\\n DESCRIPTION=\"Node.js $NODEJS_VERSION available as container is a base platform for \\\nbuilding and running various Node.js $NODEJS_VERSION applications and frameworks. \\\nNode.js is a platform built on Chrome's JavaScript runtime for easily building \\\nfast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model \\\nthat makes it lightweight and efficient, perfect for data-intensive real-time applications \\\nthat run across distributed devices.\"\n\nLABEL summary=\"$SUMMARY\" \\\n description=\"$DESCRIPTION\" \\\n io.k8s.description=\"$DESCRIPTION\" \\\n io.k8s.display-name=\"Node.js $NODEJS_VERSION\" \\\n io.openshift.expose-services=\"8080:http\" \\\n io.openshift.tags=\"builder,$NAME,${NAME}${NODEJS_VERSION}\" \\\n io.openshift.s2i.scripts-url=\"image:///usr/libexec/s2i\" \\\n io.s2i.scripts-url=\"image:///usr/libexec/s2i\" \\\n com.redhat.dev-mode=\"DEV_MODE:false\" \\\n com.redhat.deployments-dir=\"${APP_ROOT}/src\" \\\n com.redhat.dev-mode.port=\"DEBUG_PORT:5858\" \\\n com.redhat.component=\"${NAME}-${NODEJS_VERSION}-container\" \\\n name=\"ubi8/$NAME-$NODEJS_VERSION\" \\\n version=\"1\" \\\n com.redhat.license_terms=\"https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI\" \\\n maintainer=\"SoftwareCollections.org \" \\\n help=\"For more information visit https://github.com/sclorg/s2i-nodejs-container\" \\\n usage=\"s2i build ubi8/$NAME-$NODEJS_VERSION:latest \"\n\nRUN yum -y module enable nodejs:$NODEJS_VERSION && \\\n INSTALL_PKGS=\"nodejs npm nodejs-nodemon nss_wrapper\" && \\\n ln -s /usr/lib/node_modules/nodemon/bin/nodemon.js /usr/bin/nodemon && \\\n yum remove -y $INSTALL_PKGS && \\\n yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \\\n rpm -V $INSTALL_PKGS && \\\n yum clean all -y\n\n# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH\nCOPY ./s2i/bin/ $STI_SCRIPTS_PATH\n\n# Copy extra files to the image.\nCOPY ./root/ /\n\n# Drop the root user and make the content of /opt/app-root owned by user 1001\nRUN chown -R 1001:0 ${APP_ROOT} && chmod -R ug+rwx ${APP_ROOT} && \\\n rpm-file-permissions\n\nUSER 1001\n\n# Set the default CMD to print the usage of the language image\nCMD $STI_SCRIPTS_PATH/usage\n") \ No newline at end of file diff --git a/rhel/dockerfile/testdata/fuzz/FuzzLex/44d812f0623961c44832d76d3d8c03cf65d66ea4da27266e7d71c203d6aa7757 b/rhel/dockerfile/testdata/fuzz/FuzzLex/44d812f0623961c44832d76d3d8c03cf65d66ea4da27266e7d71c203d6aa7757 deleted file mode 100644 index 452612aeb..000000000 --- a/rhel/dockerfile/testdata/fuzz/FuzzLex/44d812f0623961c44832d76d3d8c03cf65d66ea4da27266e7d71c203d6aa7757 +++ /dev/null @@ -1,2 +0,0 @@ -go test fuzz v1 -[]byte("# Normal comments are fine\nFROM scratch\n\nLABEL \\\n\t# This style of comment is buck wild, but allowed.\n\tA=B \\\n\tC=D\n\t# This comment is stripped despite the apparent continuation\n\n") \ No newline at end of file diff --git a/rhel/dockerfile/testdata/fuzz/FuzzLex/5d9409a7fb62c67dc82a7ec3af76fb2f3a6cf8d18aa86f32d8ac1f0e10a13941 b/rhel/dockerfile/testdata/fuzz/FuzzLex/5d9409a7fb62c67dc82a7ec3af76fb2f3a6cf8d18aa86f32d8ac1f0e10a13941 deleted file mode 100644 index 1c1c430df..000000000 --- a/rhel/dockerfile/testdata/fuzz/FuzzLex/5d9409a7fb62c67dc82a7ec3af76fb2f3a6cf8d18aa86f32d8ac1f0e10a13941 +++ /dev/null @@ -1,2 +0,0 @@ -go test fuzz v1 -[]byte("FROM scratch\n\nENV A=\"B C\" \\\n D=E\n\nLABEL label=\"$A $D\"\n") \ No newline at end of file diff --git a/rhel/dockerfile/testdata/fuzz/FuzzLex/7d0554d5c273741f5c70d45a79fc6cb5e9fd4078a4564f6bf41e3dff6db41d2f b/rhel/dockerfile/testdata/fuzz/FuzzLex/7d0554d5c273741f5c70d45a79fc6cb5e9fd4078a4564f6bf41e3dff6db41d2f deleted file mode 100644 index d80530d49..000000000 --- a/rhel/dockerfile/testdata/fuzz/FuzzLex/7d0554d5c273741f5c70d45a79fc6cb5e9fd4078a4564f6bf41e3dff6db41d2f +++ /dev/null @@ -1,2 +0,0 @@ -go test fuzz v1 -[]byte("FROM sha256:80f381f67fab035e7df9e0714aca8a13b49af52f40482fadcfb893b50740272c\n\n# Redis image based on Software Collections packages\n#\n# Volumes:\n# * /var/lib/redis/data - Datastore for Redis\n# Environment:\n# * $REDIS_PASSWORD - Database password\n\nENV REDIS_VERSION=5 \\\n HOME=/var/lib/redis\n\nENV SUMMARY=\"Redis in-memory data structure store, used as database, cache and message broker\" \\\n DESCRIPTION=\"Redis $REDIS_VERSION available as container, is an advanced key-value store. \\\nIt is often referred to as a data structure server since keys can contain strings, hashes, lists, \\\nsets and sorted sets. You can run atomic operations on these types, like appending to a string; \\\nincrementing the value in a hash; pushing to a list; computing set intersection, union and difference; \\\nor getting the member with highest ranking in a sorted set. In order to achieve its outstanding \\\nperformance, Redis works with an in-memory dataset. Depending on your use case, you can persist \\\nit either by dumping the dataset to disk every once in a while, or by appending each command to a log.\"\n\nLABEL summary=\"$SUMMARY\" \\\n description=\"$DESCRIPTION\" \\\n io.k8s.description=\"$DESCRIPTION\" \\\n io.k8s.display-name=\"Redis 5\" \\\n io.openshift.expose-services=\"6379:redis\" \\\n io.openshift.tags=\"database,redis,redis5,rh-redis5\" \\\n com.redhat.component=\"rh-redis5-container\" \\\n name=\"rhscl/redis-5-rhel7\" \\\n version=\"5\" \\\n com.redhat.license_terms=\"https://www.redhat.com/en/about/red-hat-end-user-license-agreements#rhel\" \\\n usage=\"podman run -d --name redis_database -p 6379:6379 rhscl/redis-5-rhel7\" \\\n maintainer=\"SoftwareCollections.org \"\n\nEXPOSE 6379\n\n# Create user for redis that has known UID\n# We need to do this before installing the RPMs which would create user with random UID\n# The UID is the one used by the default user from the parent layer (1001),\n# and since the user exists already, do not create a new one, but only rename\n# the existing\n# This image must forever use UID 1001 for redis user so our volumes are\n# safe in the future. This should *never* change, the last test is there\n# to make sure of that.\nRUN getent group redis &> /dev/null || groupadd -r redis &> /dev/null && \\\n usermod -l redis -aG redis -c 'Redis Server' default &> /dev/null && \\\n# Install gettext for envsubst command\n yum install -y yum-utils gettext && \\\n prepare-yum-repositories rhel-server-rhscl-7-rpms && \\\n INSTALL_PKGS=\"rh-redis5\" && \\\n yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \\\n rpm -V $INSTALL_PKGS && \\\n yum -y clean all --enablerepo='*' && \\\n mkdir -p /var/lib/redis/data && chown -R redis.0 /var/lib/redis && \\\n [[ \"$(id redis)\" == \"uid=1001(redis)\"* ]]\n\n# Get prefix path and path to scripts rather than hard-code them in scripts\nENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/redis \\\n REDIS_PREFIX=/opt/rh/rh-redis5/root/usr \\\n ENABLED_COLLECTIONS=rh-redis5\n\n# When bash is started non-interactively, to run a shell script, for example it\n# looks for this variable and source the content of this file. This will enable\n# the SCL for all scripts without need to do 'scl enable'.\nENV BASH_ENV=${CONTAINER_SCRIPTS_PATH}/scl_enable \\\n ENV=${CONTAINER_SCRIPTS_PATH}/scl_enable \\\n PROMPT_COMMAND=\". ${CONTAINER_SCRIPTS_PATH}/scl_enable\"\n\nCOPY root /\n\n# this is needed due to issues with squash\n# when this directory gets rm'd by the container-setup\n# script.\nRUN /usr/libexec/container-setup\n\nVOLUME [\"/var/lib/redis/data\"]\n\n# Using a numeric value because of a comment in [1]:\n# If your S2I image does not include a USER declaration with a numeric user,\n# your builds will fail by default.\n# [1] https://docs.openshift.com/container-platform/4.4/openshift_images/create-images.html#images-create-guide-openshift_create-images\nUSER 1001\n\nENTRYPOINT [\"container-entrypoint\"]\nCMD [\"run-redis\"]\n\nADD help.1 /help.1\nADD rh-redis5-container-5-53.1634738116.json /root/buildinfo/content_manifests/rh-redis5-container-5-53.1634738116.json\nLABEL \"release\"=\"53.1634738116\" \"distribution-scope\"=\"public\" \"vendor\"=\"Red Hat, Inc.\" \"build-date\"=\"2021-10-20T13:56:03.899740\" \"architecture\"=\"x86_64\" \"vcs-type\"=\"git\" \"vcs-ref\"=\"1ca08b535089c4828147120ead2699d9f237260a\" \"com.redhat.build-host\"=\"cpt-1007.osbs.prod.upshift.rdu2.redhat.com\" \"url\"=\"https://access.redhat.com/containers/#/registry.access.redhat.com/rhscl/redis-5-rhel7/images/5-53.1634738116\"\n") \ No newline at end of file diff --git a/rhel/dockerfile/testdata/fuzz/FuzzLex/8a4f9ec44aa389844ede8344443ce80aba4c870749a8646e569e0ed7aa5f0edb b/rhel/dockerfile/testdata/fuzz/FuzzLex/8a4f9ec44aa389844ede8344443ce80aba4c870749a8646e569e0ed7aa5f0edb deleted file mode 100644 index 33ff204fb..000000000 --- a/rhel/dockerfile/testdata/fuzz/FuzzLex/8a4f9ec44aa389844ede8344443ce80aba4c870749a8646e569e0ed7aa5f0edb +++ /dev/null @@ -1,2 +0,0 @@ -go test fuzz v1 -[]byte("FROM sha256:434a2388fbeb26e01bcd776e5c9de4ff73473f33013952ee34209e8b5259d927\n\nMAINTAINER Red Hat, Inc.\n\nLABEL com.redhat.component=\"ubi7-container\"\nLABEL name=\"ubi7\"\nLABEL version=\"7.9\"\n\nLABEL com.redhat.license_terms=\"https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI\"\n\n#labels for container catalog\nLABEL summary=\"Provides the latest release of the Red Hat Universal Base Image 7.\"\nLABEL description=\"The Universal Base Image is designed and engineered to be the base layer for all of your containerized applications, middleware and utilities. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly.\"\nLABEL io.k8s.display-name=\"Red Hat Universal Base Image 7\"\nLABEL io.openshift.tags=\"base rhel7\"\n\nENV container oci\nENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n\nCMD [\"/bin/bash\"]\n\nADD ubi7-container-7.9-516.json /root/buildinfo/content_manifests/ubi7-container-7.9-516.json\nLABEL \"release\"=\"516\" \"distribution-scope\"=\"public\" \"vendor\"=\"Red Hat, Inc.\" \"build-date\"=\"2021-10-05T10:17:02.802845\" \"architecture\"=\"x86_64\" \"vcs-type\"=\"git\" \"vcs-ref\"=\"a4e710a688a6374670ecdd56637c3f683d11cbe3\" \"com.redhat.build-host\"=\"cpt-1007.osbs.prod.upshift.rdu2.redhat.com\" \"io.k8s.description\"=\"The Universal Base Image is designed and engineered to be the base layer for all of your containerized applications, middleware and utilities. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly.\" \"url\"=\"https://access.redhat.com/containers/#/registry.access.redhat.com/ubi7/images/7.9-516\"\n") \ No newline at end of file diff --git a/rhel/dockerfile/testdata/fuzz/FuzzLex/a80c4576f57f0126dcd6877223a48df920edcd7d9eb22eb85f26b81f853675a3 b/rhel/dockerfile/testdata/fuzz/FuzzLex/a80c4576f57f0126dcd6877223a48df920edcd7d9eb22eb85f26b81f853675a3 deleted file mode 100644 index 4ce346e1c..000000000 --- a/rhel/dockerfile/testdata/fuzz/FuzzLex/a80c4576f57f0126dcd6877223a48df920edcd7d9eb22eb85f26b81f853675a3 +++ /dev/null @@ -1,2 +0,0 @@ -go test fuzz v1 -[]byte("FROM sha256:b3749cc58242c3fda50fb4541cd23144d42a85054d70bfe1e79eb719d212ac6f\r\n\r\nLABEL maintainer=\"Red Hat, Inc.\"\r\n\r\nLABEL com.redhat.component=\"ubi8-minimal-container\" \\\r\n name=\"ubi8-minimal\" \\\r\n version=\"8.4\"\r\n\r\n#label for EULA \r\nLABEL com.redhat.license_terms=\"https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI\"\r\n\r\n#labels for container catalog\r\nLABEL summary=\"Provides the latest release of the minimal Red Hat Universal Base Image 8.\"\r\nLABEL description=\"The Universal Base Image Minimal is a stripped down image that uses microdnf as a package manager. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly.\"\r\nLABEL io.k8s.display-name=\"Red Hat Universal Base Image 8 Minimal\"\r\nLABEL io.openshift.expose-services=\"\"\r\nLABEL io.openshift.tags=\"minimal rhel8\"\r\n\r\nENV container oci\r\nENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\r\n\r\nCMD [\"/bin/bash\"]\r\n\r\nRUN rm -rf /var/log/*\r\n\r\nADD ubi8-minimal-container-8.4-208.json /root/buildinfo/content_manifests/ubi8-minimal-container-8.4-208.json\r\nLABEL \"release\"=\"208\" \"distribution-scope\"=\"public\" \"vendor\"=\"Red Hat, Inc.\" \"build-date\"=\"2021-08-03T16:57:21.054109\" \"architecture\"=\"x86_64\" \"vcs-type\"=\"git\" \"vcs-ref\"=\"7256039d3c371a38cf13906dcf5688c19700c73b\" \"com.redhat.build-host\"=\"cpt-1002.osbs.prod.upshift.rdu2.redhat.com\" \"io.k8s.description\"=\"The Universal Base Image Minimal is a stripped down image that uses microdnf as a package manager. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly.\" \"url\"=\"https://access.redhat.com/containers/#/registry.access.redhat.com/ubi8-minimal/images/8.4-208\"\r\n") \ No newline at end of file diff --git a/rhel/dockerfile/testdata/fuzz/FuzzLex/cf56de3b7b19f8820b18632df14923bfd386fbc800b4cf21ac8033761770cf04 b/rhel/dockerfile/testdata/fuzz/FuzzLex/cf56de3b7b19f8820b18632df14923bfd386fbc800b4cf21ac8033761770cf04 deleted file mode 100644 index 69cc88be4..000000000 --- a/rhel/dockerfile/testdata/fuzz/FuzzLex/cf56de3b7b19f8820b18632df14923bfd386fbc800b4cf21ac8033761770cf04 +++ /dev/null @@ -1,2 +0,0 @@ -go test fuzz v1 -[]byte("# This image is the base image for all s2i configurable container images.\nFROM sha256:6f683d6ef7a8199fdabf203f98cce97d628e40eefa42b7085f1f151d384a97fc\n\nENV SUMMARY=\"Base image which allows using of source-to-image.\"\t\\\n DESCRIPTION=\"The s2i-core image provides any images layered on top of it \\\nwith all the tools needed to use source-to-image functionality while keeping \\\nthe image size as small as possible.\"\n\nLABEL summary=\"$SUMMARY\" \\\n description=\"$DESCRIPTION\" \\\n io.k8s.description=\"$DESCRIPTION\" \\\n io.k8s.display-name=\"s2i core\" \\\n io.openshift.s2i.scripts-url=image:///usr/libexec/s2i \\\n io.s2i.scripts-url=image:///usr/libexec/s2i \\\n com.redhat.component=\"s2i-core-container\" \\\n name=\"rhscl/s2i-core-rhel7\" \\\n version=\"1\" \\\n com.redhat.license_terms=\"https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI\"\n\nENV \\\n # DEPRECATED: Use above LABEL instead, because this will be removed in future versions.\n STI_SCRIPTS_URL=image:///usr/libexec/s2i \\\n # Path to be used in other layers to place s2i scripts into\n STI_SCRIPTS_PATH=/usr/libexec/s2i \\\n APP_ROOT=/opt/app-root \\\n # The $HOME is not set by default, but some applications needs this variable\n # TODO: There is a bug in rhel7.1 image where the PATH variable is not exported\n # properly as container image metadata, which causes the $PATH variable do not\n # expand properly.\n HOME=/opt/app-root/src \\\n PATH=/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \\\n PLATFORM=\"el7\"\n\n# When bash is started non-interactively, to run a shell script, for example it\n# looks for this variable and source the content of this file. This will enable\n# the SCL for all scripts without need to do 'scl enable'.\nENV BASH_ENV=${APP_ROOT}/etc/scl_enable \\\n ENV=${APP_ROOT}/etc/scl_enable \\\n PROMPT_COMMAND=\". ${APP_ROOT}/etc/scl_enable\"\n\n# Copy just prepare-yum-repositories that is needed for packages install step,\n# other files might be added later so changing them does not cause packages\n# to be installed again, which takes long time\nCOPY ./root/usr/bin/prepare-yum-repositories /usr/bin/prepare-yum-repositories\n\n# This is the list of basic dependencies that all language container image can\n# consume.\n# Also setup the 'openshift' user that is used for the build execution and for the\n# application runtime execution.\n# TODO: Use better UID and GID values\nRUN prepare-yum-repositories && \\\n INSTALL_PKGS=\"bsdtar \\\n findutils \\\n gettext \\\n groff-base \\\n rsync \\\n scl-utils \\\n tar \\\n unzip \\\n yum-utils\" && \\\n mkdir -p ${HOME}/.pki/nssdb && \\\n chown -R 1001:0 ${HOME}/.pki && \\\n yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \\\n rpm -V $INSTALL_PKGS && \\\n yum -y clean all --enablerepo='*'\n\n# Copy extra files to the image.\nCOPY ./root/ /\n\n# Directory with the sources is set as the working directory so all STI scripts\n# can execute relative to this path.\nWORKDIR ${HOME}\n\nENTRYPOINT [\"container-entrypoint\"]\nCMD [\"base-usage\"]\n\n# Reset permissions of modified directories and add default user\nRUN rpm-file-permissions && \\\n useradd -u 1001 -r -g 0 -d ${HOME} -s /sbin/nologin \\\n -c \"Default Application User\" default && \\\n chown -R 1001:0 ${APP_ROOT}\n\nADD help.1 /help.1\nADD s2i-core-container-1-235.json /root/buildinfo/content_manifests/s2i-core-container-1-235.json\nLABEL \"release\"=\"235\" \"distribution-scope\"=\"public\" \"vendor\"=\"Red Hat, Inc.\" \"build-date\"=\"2021-10-06T13:08:17.304497\" \"architecture\"=\"x86_64\" \"vcs-type\"=\"git\" \"vcs-ref\"=\"7fb31fe42247120f04b5e2d94f1719411f1037e8\" \"com.redhat.build-host\"=\"cpt-1005.osbs.prod.upshift.rdu2.redhat.com\" \"url\"=\"https://access.redhat.com/containers/#/registry.access.redhat.com/rhscl/s2i-core-rhel7/images/1-235\"\n") \ No newline at end of file diff --git a/rhel/dockerfile/testdata/fuzz/FuzzLex/d552ebffd8434d619cd4f4011e8943d313f8c1dcbbc3689b9b20dcc97ea3814d b/rhel/dockerfile/testdata/fuzz/FuzzLex/d552ebffd8434d619cd4f4011e8943d313f8c1dcbbc3689b9b20dcc97ea3814d deleted file mode 100644 index 13a3c88f1..000000000 --- a/rhel/dockerfile/testdata/fuzz/FuzzLex/d552ebffd8434d619cd4f4011e8943d313f8c1dcbbc3689b9b20dcc97ea3814d +++ /dev/null @@ -1,2 +0,0 @@ -go test fuzz v1 -[]byte("LABEL A=B \\\n\tC=D # Comments not allowed in this position\n") \ No newline at end of file diff --git a/rhel/dockerfile/testdata/Dockerfile-nodejs10 b/rhel/dockerfile/testdata/nodejs10.txtar similarity index 64% rename from rhel/dockerfile/testdata/Dockerfile-nodejs10 rename to rhel/dockerfile/testdata/nodejs10.txtar index a7d349580..cf3415d57 100644 --- a/rhel/dockerfile/testdata/Dockerfile-nodejs10 +++ b/rhel/dockerfile/testdata/nodejs10.txtar @@ -1,3 +1,4 @@ +-- Dockerfile -- FROM ubi8/s2i-base:rhel8.1 # This image provides a Node.JS environment you can use to run your Node.JS @@ -71,3 +72,24 @@ USER 1001 # Set the default CMD to print the usage of the language image CMD $STI_SCRIPTS_PATH/usage +-- Want -- +{ + "com.redhat.component": "nodejs-10-container", + "com.redhat.deployments-dir": "/src", + "com.redhat.dev-mode": "DEV_MODE:false", + "com.redhat.dev-mode.port": "DEBUG_PORT:5858", + "com.redhat.license_terms": "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI", + "description": "Node.js 10 available as container is a base platform for building and running various Node.js 10 applications and frameworks. Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.", + "help": "For more information visit https://github.com/sclorg/s2i-nodejs-container", + "io.k8s.description": "Node.js 10 available as container is a base platform for building and running various Node.js 10 applications and frameworks. Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.", + "io.k8s.display-name": "Node.js 10", + "io.openshift.expose-services": "8080:http", + "io.openshift.s2i.scripts-url": "image:///usr/libexec/s2i", + "io.openshift.tags": "builder,nodejs,nodejs10", + "io.s2i.scripts-url": "image:///usr/libexec/s2i", + "maintainer": "SoftwareCollections.org ", + "name": "ubi8/10", + "summary": "Platform for building and running Node.js 10 applications", + "usage": "s2i build ubi8/10:latest ", + "version": "1" +} diff --git a/rhel/dockerfile/testdata/Dockerfile-quay-quay-rhel8-v3.5.6-4 b/rhel/dockerfile/testdata/quay-quay-rhel8-v3.5.6-4.txtar similarity index 87% rename from rhel/dockerfile/testdata/Dockerfile-quay-quay-rhel8-v3.5.6-4 rename to rhel/dockerfile/testdata/quay-quay-rhel8-v3.5.6-4.txtar index 5a4dc7657..7c78e09ff 100644 --- a/rhel/dockerfile/testdata/Dockerfile-quay-quay-rhel8-v3.5.6-4 +++ b/rhel/dockerfile/testdata/quay-quay-rhel8-v3.5.6-4.txtar @@ -1,3 +1,4 @@ +-- Dockerfile -- FROM sha256:ad42391b9b4670e68a759d4cdb8780896071a1cb1ed519b474f901e597bf3b3d AS build-npm COPY $REMOTE_SOURCE $REMOTE_SOURCE_DIR @@ -153,3 +154,25 @@ CMD ["registry"] ADD quay-registry-container-v3.5.6-4.json /root/buildinfo/content_manifests/quay-registry-container-v3.5.6-4.json LABEL "release"="4" "com.redhat.license_terms"="https://www.redhat.com/agreements" "distribution-scope"="public" "vendor"="Red Hat, Inc." "build-date"="2021-08-17T21:16:14.144538" "architecture"="x86_64" "vcs-type"="git" "vcs-ref"="0e033c625b6a775f5be730ce5a938aa91cc46d29" "com.redhat.build-host"="example.com" "description"="Red Hat Quay" "url"="https://access.redhat.com/containers/#/registry.access.redhat.com/quay/quay-rhel8/images/v3.5.6-4" +-- Want -- +{ + "architecture": "x86_64", + "build-date": "2021-08-17T21:16:14.144538", + "com.redhat.build-host": "example.com", + "com.redhat.component": "quay-registry-container", + "com.redhat.license_terms": "https://www.redhat.com/agreements", + "description": "Red Hat Quay", + "distribution-scope": "public", + "io.k8s.description": "Red Hat Quay", + "io.k8s.display-name": "Red Hat Quay", + "io.openshift.tags": "quay", + "maintainer": "support@redhat.com", + "name": "quay/quay-rhel8", + "release": "4", + "summary": "Red Hat Quay", + "url": "https://access.redhat.com/containers/#/registry.access.redhat.com/quay/quay-rhel8/images/v3.5.6-4", + "vcs-ref": "0e033c625b6a775f5be730ce5a938aa91cc46d29", + "vcs-type": "git", + "vendor": "Red Hat, Inc.", + "version": "v3.5.6" +} diff --git a/rhel/dockerfile/testdata/Dockerfile-rhscl-redis-5-rhel7-5-53.1634738116 b/rhel/dockerfile/testdata/rhscl-redis-5-rhel7-5-53.1634738116.txtar similarity index 64% rename from rhel/dockerfile/testdata/Dockerfile-rhscl-redis-5-rhel7-5-53.1634738116 rename to rhel/dockerfile/testdata/rhscl-redis-5-rhel7-5-53.1634738116.txtar index c14e2b496..fd4fcd867 100644 --- a/rhel/dockerfile/testdata/Dockerfile-rhscl-redis-5-rhel7-5-53.1634738116 +++ b/rhel/dockerfile/testdata/rhscl-redis-5-rhel7-5-53.1634738116.txtar @@ -1,3 +1,4 @@ +-- Dockerfile -- FROM sha256:80f381f67fab035e7df9e0714aca8a13b49af52f40482fadcfb893b50740272c # Redis image based on Software Collections packages @@ -87,3 +88,27 @@ CMD ["run-redis"] ADD help.1 /help.1 ADD rh-redis5-container-5-53.1634738116.json /root/buildinfo/content_manifests/rh-redis5-container-5-53.1634738116.json LABEL "release"="53.1634738116" "distribution-scope"="public" "vendor"="Red Hat, Inc." "build-date"="2021-10-20T13:56:03.899740" "architecture"="x86_64" "vcs-type"="git" "vcs-ref"="1ca08b535089c4828147120ead2699d9f237260a" "com.redhat.build-host"="cpt-1007.osbs.prod.upshift.rdu2.redhat.com" "url"="https://access.redhat.com/containers/#/registry.access.redhat.com/rhscl/redis-5-rhel7/images/5-53.1634738116" +-- Want -- +{ + "architecture": "x86_64", + "build-date": "2021-10-20T13:56:03.899740", + "com.redhat.build-host": "cpt-1007.osbs.prod.upshift.rdu2.redhat.com", + "com.redhat.component": "rh-redis5-container", + "com.redhat.license_terms": "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#rhel", + "description": "Redis 5 available as container, is an advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets. You can run atomic operations on these types, like appending to a string; incrementing the value in a hash; pushing to a list; computing set intersection, union and difference; or getting the member with highest ranking in a sorted set. In order to achieve its outstanding performance, Redis works with an in-memory dataset. Depending on your use case, you can persist it either by dumping the dataset to disk every once in a while, or by appending each command to a log.", + "distribution-scope": "public", + "io.k8s.description": "Redis 5 available as container, is an advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets. You can run atomic operations on these types, like appending to a string; incrementing the value in a hash; pushing to a list; computing set intersection, union and difference; or getting the member with highest ranking in a sorted set. In order to achieve its outstanding performance, Redis works with an in-memory dataset. Depending on your use case, you can persist it either by dumping the dataset to disk every once in a while, or by appending each command to a log.", + "io.k8s.display-name": "Redis 5", + "io.openshift.expose-services": "6379:redis", + "io.openshift.tags": "database,redis,redis5,rh-redis5", + "maintainer": "SoftwareCollections.org ", + "name": "rhscl/redis-5-rhel7", + "release": "53.1634738116", + "summary": "Redis in-memory data structure store, used as database, cache and message broker", + "url": "https://access.redhat.com/containers/#/registry.access.redhat.com/rhscl/redis-5-rhel7/images/5-53.1634738116", + "usage": "podman run -d --name redis_database -p 6379:6379 rhscl/redis-5-rhel7", + "vcs-ref": "1ca08b535089c4828147120ead2699d9f237260a", + "vcs-type": "git", + "vendor": "Red Hat, Inc.", + "version": "5" +} diff --git a/rhel/dockerfile/testdata/Dockerfile-rhscl-s2i-core-rhel7-1-235 b/rhel/dockerfile/testdata/rhscl-s2i-core-rhel7-1-235.txtar similarity index 74% rename from rhel/dockerfile/testdata/Dockerfile-rhscl-s2i-core-rhel7-1-235 rename to rhel/dockerfile/testdata/rhscl-s2i-core-rhel7-1-235.txtar index b4f4aa535..56071dc4a 100644 --- a/rhel/dockerfile/testdata/Dockerfile-rhscl-s2i-core-rhel7-1-235 +++ b/rhel/dockerfile/testdata/rhscl-s2i-core-rhel7-1-235.txtar @@ -1,3 +1,4 @@ +-- Dockerfile -- # This image is the base image for all s2i configurable container images. FROM sha256:6f683d6ef7a8199fdabf203f98cce97d628e40eefa42b7085f1f151d384a97fc @@ -83,3 +84,25 @@ RUN rpm-file-permissions && \ ADD help.1 /help.1 ADD s2i-core-container-1-235.json /root/buildinfo/content_manifests/s2i-core-container-1-235.json LABEL "release"="235" "distribution-scope"="public" "vendor"="Red Hat, Inc." "build-date"="2021-10-06T13:08:17.304497" "architecture"="x86_64" "vcs-type"="git" "vcs-ref"="7fb31fe42247120f04b5e2d94f1719411f1037e8" "com.redhat.build-host"="cpt-1005.osbs.prod.upshift.rdu2.redhat.com" "url"="https://access.redhat.com/containers/#/registry.access.redhat.com/rhscl/s2i-core-rhel7/images/1-235" +-- Want -- +{ + "architecture": "x86_64", + "build-date": "2021-10-06T13:08:17.304497", + "com.redhat.build-host": "cpt-1005.osbs.prod.upshift.rdu2.redhat.com", + "com.redhat.component": "s2i-core-container", + "com.redhat.license_terms": "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI", + "description": "The s2i-core image provides any images layered on top of it with all the tools needed to use source-to-image functionality while keeping the image size as small as possible.", + "distribution-scope": "public", + "io.k8s.description": "The s2i-core image provides any images layered on top of it with all the tools needed to use source-to-image functionality while keeping the image size as small as possible.", + "io.k8s.display-name": "s2i core", + "io.openshift.s2i.scripts-url": "image:///usr/libexec/s2i", + "io.s2i.scripts-url": "image:///usr/libexec/s2i", + "name": "rhscl/s2i-core-rhel7", + "release": "235", + "summary": "Base image which allows using of source-to-image.", + "url": "https://access.redhat.com/containers/#/registry.access.redhat.com/rhscl/s2i-core-rhel7/images/1-235", + "vcs-ref": "7fb31fe42247120f04b5e2d94f1719411f1037e8", + "vcs-type": "git", + "vendor": "Red Hat, Inc.", + "version": "1" +} diff --git a/rhel/dockerfile/testdata/Dockerfile-ubi7-7.9-516 b/rhel/dockerfile/testdata/ubi7-7.9.txtar similarity index 54% rename from rhel/dockerfile/testdata/Dockerfile-ubi7-7.9-516 rename to rhel/dockerfile/testdata/ubi7-7.9.txtar index 6364c375b..5de40851d 100644 --- a/rhel/dockerfile/testdata/Dockerfile-ubi7-7.9-516 +++ b/rhel/dockerfile/testdata/ubi7-7.9.txtar @@ -1,3 +1,4 @@ +-- Dockerfile -- FROM sha256:434a2388fbeb26e01bcd776e5c9de4ff73473f33013952ee34209e8b5259d927 MAINTAINER Red Hat, Inc. @@ -21,3 +22,24 @@ CMD ["/bin/bash"] ADD ubi7-container-7.9-516.json /root/buildinfo/content_manifests/ubi7-container-7.9-516.json LABEL "release"="516" "distribution-scope"="public" "vendor"="Red Hat, Inc." "build-date"="2021-10-05T10:17:02.802845" "architecture"="x86_64" "vcs-type"="git" "vcs-ref"="a4e710a688a6374670ecdd56637c3f683d11cbe3" "com.redhat.build-host"="cpt-1007.osbs.prod.upshift.rdu2.redhat.com" "io.k8s.description"="The Universal Base Image is designed and engineered to be the base layer for all of your containerized applications, middleware and utilities. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly." "url"="https://access.redhat.com/containers/#/registry.access.redhat.com/ubi7/images/7.9-516" +-- Want -- +{ + "architecture": "x86_64", + "build-date": "2021-10-05T10:17:02.802845", + "com.redhat.build-host": "cpt-1007.osbs.prod.upshift.rdu2.redhat.com", + "com.redhat.component": "ubi7-container", + "com.redhat.license_terms": "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI", + "description": "The Universal Base Image is designed and engineered to be the base layer for all of your containerized applications, middleware and utilities. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly.", + "distribution-scope": "public", + "io.k8s.description": "The Universal Base Image is designed and engineered to be the base layer for all of your containerized applications, middleware and utilities. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly.", + "io.k8s.display-name": "Red Hat Universal Base Image 7", + "io.openshift.tags": "base rhel7", + "name": "ubi7", + "release": "516", + "summary": "Provides the latest release of the Red Hat Universal Base Image 7.", + "url": "https://access.redhat.com/containers/#/registry.access.redhat.com/ubi7/images/7.9-516", + "vcs-ref": "a4e710a688a6374670ecdd56637c3f683d11cbe3", + "vcs-type": "git", + "vendor": "Red Hat, Inc.", + "version": "7.9" +} diff --git a/rhel/dockerfile/testdata/Dockerfile-ubi8-minimal-8.4-208 b/rhel/dockerfile/testdata/ubi8-minimal-8.4-208.txtar similarity index 54% rename from rhel/dockerfile/testdata/Dockerfile-ubi8-minimal-8.4-208 rename to rhel/dockerfile/testdata/ubi8-minimal-8.4-208.txtar index 9380e6cef..243d1ca23 100644 --- a/rhel/dockerfile/testdata/Dockerfile-ubi8-minimal-8.4-208 +++ b/rhel/dockerfile/testdata/ubi8-minimal-8.4-208.txtar @@ -1,27 +1,51 @@ -FROM sha256:b3749cc58242c3fda50fb4541cd23144d42a85054d70bfe1e79eb719d212ac6f - -LABEL maintainer="Red Hat, Inc." - -LABEL com.redhat.component="ubi8-minimal-container" \ - name="ubi8-minimal" \ - version="8.4" - -#label for EULA -LABEL com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" - -#labels for container catalog -LABEL summary="Provides the latest release of the minimal Red Hat Universal Base Image 8." -LABEL description="The Universal Base Image Minimal is a stripped down image that uses microdnf as a package manager. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly." -LABEL io.k8s.display-name="Red Hat Universal Base Image 8 Minimal" -LABEL io.openshift.expose-services="" -LABEL io.openshift.tags="minimal rhel8" - -ENV container oci -ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin - -CMD ["/bin/bash"] - -RUN rm -rf /var/log/* - -ADD ubi8-minimal-container-8.4-208.json /root/buildinfo/content_manifests/ubi8-minimal-container-8.4-208.json -LABEL "release"="208" "distribution-scope"="public" "vendor"="Red Hat, Inc." "build-date"="2021-08-03T16:57:21.054109" "architecture"="x86_64" "vcs-type"="git" "vcs-ref"="7256039d3c371a38cf13906dcf5688c19700c73b" "com.redhat.build-host"="cpt-1002.osbs.prod.upshift.rdu2.redhat.com" "io.k8s.description"="The Universal Base Image Minimal is a stripped down image that uses microdnf as a package manager. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly." "url"="https://access.redhat.com/containers/#/registry.access.redhat.com/ubi8-minimal/images/8.4-208" +-- Dockerfile -- +FROM sha256:b3749cc58242c3fda50fb4541cd23144d42a85054d70bfe1e79eb719d212ac6f + +LABEL maintainer="Red Hat, Inc." + +LABEL com.redhat.component="ubi8-minimal-container" \ + name="ubi8-minimal" \ + version="8.4" + +#label for EULA +LABEL com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" + +#labels for container catalog +LABEL summary="Provides the latest release of the minimal Red Hat Universal Base Image 8." +LABEL description="The Universal Base Image Minimal is a stripped down image that uses microdnf as a package manager. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly." +LABEL io.k8s.display-name="Red Hat Universal Base Image 8 Minimal" +LABEL io.openshift.expose-services="" +LABEL io.openshift.tags="minimal rhel8" + +ENV container oci +ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + +CMD ["/bin/bash"] + +RUN rm -rf /var/log/* + +ADD ubi8-minimal-container-8.4-208.json /root/buildinfo/content_manifests/ubi8-minimal-container-8.4-208.json +LABEL "release"="208" "distribution-scope"="public" "vendor"="Red Hat, Inc." "build-date"="2021-08-03T16:57:21.054109" "architecture"="x86_64" "vcs-type"="git" "vcs-ref"="7256039d3c371a38cf13906dcf5688c19700c73b" "com.redhat.build-host"="cpt-1002.osbs.prod.upshift.rdu2.redhat.com" "io.k8s.description"="The Universal Base Image Minimal is a stripped down image that uses microdnf as a package manager. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly." "url"="https://access.redhat.com/containers/#/registry.access.redhat.com/ubi8-minimal/images/8.4-208" +-- Want -- +{ + "architecture": "x86_64", + "build-date": "2021-08-03T16:57:21.054109", + "com.redhat.build-host": "cpt-1002.osbs.prod.upshift.rdu2.redhat.com", + "com.redhat.component": "ubi8-minimal-container", + "com.redhat.license_terms": "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI", + "description": "The Universal Base Image Minimal is a stripped down image that uses microdnf as a package manager. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly.", + "distribution-scope": "public", + "io.k8s.description": "The Universal Base Image Minimal is a stripped down image that uses microdnf as a package manager. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly.", + "io.k8s.display-name": "Red Hat Universal Base Image 8 Minimal", + "io.openshift.expose-services": "", + "io.openshift.tags": "minimal rhel8", + "maintainer": "Red Hat, Inc.", + "name": "ubi8-minimal", + "release": "208", + "summary": "Provides the latest release of the minimal Red Hat Universal Base Image 8.", + "url": "https://access.redhat.com/containers/#/registry.access.redhat.com/ubi8-minimal/images/8.4-208", + "vcs-ref": "7256039d3c371a38cf13906dcf5688c19700c73b", + "vcs-type": "git", + "vendor": "Red Hat, Inc.", + "version": "8.4" +}