From 88294d8ed8c5feec450a86be52020d618a531265 Mon Sep 17 00:00:00 2001 From: Jake Torrance Date: Tue, 10 Sep 2024 10:27:21 +0000 Subject: [PATCH 1/8] Add OCNE based k8s tool images that supply helm and kubectl. --- .github/workflows/build-and-push-dev-images.yml | 4 ++-- .../oraclelinux8/ocne-k8s-tools/18/Dockerfile | 11 +++++++++++ .../oraclelinux9/ocne-k8s-tools/18/Dockerfile | 11 +++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 OracleLinuxDevelopers/oraclelinux8/ocne-k8s-tools/18/Dockerfile create mode 100644 OracleLinuxDevelopers/oraclelinux9/ocne-k8s-tools/18/Dockerfile diff --git a/.github/workflows/build-and-push-dev-images.yml b/.github/workflows/build-and-push-dev-images.yml index 7612a3e19e..c646476b6b 100644 --- a/.github/workflows/build-and-push-dev-images.yml +++ b/.github/workflows/build-and-push-dev-images.yml @@ -28,13 +28,13 @@ on: required: false lang: description: List of languages to build - default: 'gcc-toolset, golang, nginx, nodejs, php, python, redis, ruby, haproxy' + default: 'gcc-toolset, golang, nginx, nodejs, php, python, redis, ruby, haproxy, ocne-k8s-tools' required: false # Default values for the builds triggered by the push event env: ol: 'oraclelinux7, oraclelinux8, oraclelinux9' - lang: 'gcc-toolset, golang, nodejs, nginx, php, python, redis, ruby, haproxy' + lang: 'gcc-toolset, golang, nodejs, nginx, php, python, redis, ruby, haproxy, ocne-k8s-tools' jobs: prepare: diff --git a/OracleLinuxDevelopers/oraclelinux8/ocne-k8s-tools/18/Dockerfile b/OracleLinuxDevelopers/oraclelinux8/ocne-k8s-tools/18/Dockerfile new file mode 100644 index 0000000000..a2a79f2eb4 --- /dev/null +++ b/OracleLinuxDevelopers/oraclelinux8/ocne-k8s-tools/18/Dockerfile @@ -0,0 +1,11 @@ +# Copyright (c) 2024 Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. + +FROM ghcr.io/oracle/oraclelinux:8 + +RUN dnf install -y oracle-olcne-release-el8 && \ + dnf config-manager --enable ol8_olcne18 ol8_addons ol8_baseos_latest ol8_appstream && \ + dnf install -y kubectl helm && \ + rm -rf /var/cache/dnf + +CMD ["kubectl", "--help"] \ No newline at end of file diff --git a/OracleLinuxDevelopers/oraclelinux9/ocne-k8s-tools/18/Dockerfile b/OracleLinuxDevelopers/oraclelinux9/ocne-k8s-tools/18/Dockerfile new file mode 100644 index 0000000000..3498f047cc --- /dev/null +++ b/OracleLinuxDevelopers/oraclelinux9/ocne-k8s-tools/18/Dockerfile @@ -0,0 +1,11 @@ +# Copyright (c) 2024 Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. + +FROM ghcr.io/oracle/oraclelinux:9 + +RUN dnf install -y oracle-olcne-release-el9 && \ + dnf config-manager --enable ol9_olcne18 ol9_addons ol9_baseos_latest ol9_appstream && \ + dnf install -y kubectl helm && \ + rm -rf /var/cache/dnf + +CMD ["kubectl", "--help"] \ No newline at end of file From 13a0b7257afb2663473c2bf8f4109636d4099ee5 Mon Sep 17 00:00:00 2001 From: Jake Torrance Date: Tue, 10 Sep 2024 10:43:11 +0000 Subject: [PATCH 2/8] Rename to more logical versions --- .../oraclelinux8/ocne-k8s-tools/{18 => 1.8}/Dockerfile | 0 .../oraclelinux9/ocne-k8s-tools/{18 => 1.8}/Dockerfile | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename OracleLinuxDevelopers/oraclelinux8/ocne-k8s-tools/{18 => 1.8}/Dockerfile (100%) rename OracleLinuxDevelopers/oraclelinux9/ocne-k8s-tools/{18 => 1.8}/Dockerfile (100%) diff --git a/OracleLinuxDevelopers/oraclelinux8/ocne-k8s-tools/18/Dockerfile b/OracleLinuxDevelopers/oraclelinux8/ocne-k8s-tools/1.8/Dockerfile similarity index 100% rename from OracleLinuxDevelopers/oraclelinux8/ocne-k8s-tools/18/Dockerfile rename to OracleLinuxDevelopers/oraclelinux8/ocne-k8s-tools/1.8/Dockerfile diff --git a/OracleLinuxDevelopers/oraclelinux9/ocne-k8s-tools/18/Dockerfile b/OracleLinuxDevelopers/oraclelinux9/ocne-k8s-tools/1.8/Dockerfile similarity index 100% rename from OracleLinuxDevelopers/oraclelinux9/ocne-k8s-tools/18/Dockerfile rename to OracleLinuxDevelopers/oraclelinux9/ocne-k8s-tools/1.8/Dockerfile From 39edff26531be6f56f579bddbd0477a5cdbcf705 Mon Sep 17 00:00:00 2001 From: Jake Torrance Date: Tue, 10 Sep 2024 11:54:56 +0000 Subject: [PATCH 3/8] Do helm and kubectl images instead --- .github/workflows/build-and-push-dev-images.yml | 4 ++-- .../{ocne-k8s-tools/1.8 => helm/3.12}/Dockerfile | 7 +++++-- .../oraclelinux8/kubectl/1.28/Dockerfile | 14 ++++++++++++++ .../{ocne-k8s-tools/1.8 => helm/3.12}/Dockerfile | 7 +++++-- .../oraclelinux9/kubectl/1.28/Dockerfile | 14 ++++++++++++++ 5 files changed, 40 insertions(+), 6 deletions(-) rename OracleLinuxDevelopers/oraclelinux8/{ocne-k8s-tools/1.8 => helm/3.12}/Dockerfile (80%) create mode 100644 OracleLinuxDevelopers/oraclelinux8/kubectl/1.28/Dockerfile rename OracleLinuxDevelopers/oraclelinux9/{ocne-k8s-tools/1.8 => helm/3.12}/Dockerfile (80%) create mode 100644 OracleLinuxDevelopers/oraclelinux9/kubectl/1.28/Dockerfile diff --git a/.github/workflows/build-and-push-dev-images.yml b/.github/workflows/build-and-push-dev-images.yml index c646476b6b..95e60f382e 100644 --- a/.github/workflows/build-and-push-dev-images.yml +++ b/.github/workflows/build-and-push-dev-images.yml @@ -28,13 +28,13 @@ on: required: false lang: description: List of languages to build - default: 'gcc-toolset, golang, nginx, nodejs, php, python, redis, ruby, haproxy, ocne-k8s-tools' + default: 'gcc-toolset, golang, nginx, nodejs, php, python, redis, ruby, haproxy, kubectl, helm' required: false # Default values for the builds triggered by the push event env: ol: 'oraclelinux7, oraclelinux8, oraclelinux9' - lang: 'gcc-toolset, golang, nodejs, nginx, php, python, redis, ruby, haproxy, ocne-k8s-tools' + lang: 'gcc-toolset, golang, nodejs, nginx, php, python, redis, ruby, haproxy, kubectl, helm' jobs: prepare: diff --git a/OracleLinuxDevelopers/oraclelinux8/ocne-k8s-tools/1.8/Dockerfile b/OracleLinuxDevelopers/oraclelinux8/helm/3.12/Dockerfile similarity index 80% rename from OracleLinuxDevelopers/oraclelinux8/ocne-k8s-tools/1.8/Dockerfile rename to OracleLinuxDevelopers/oraclelinux8/helm/3.12/Dockerfile index a2a79f2eb4..60ffd2151d 100644 --- a/OracleLinuxDevelopers/oraclelinux8/ocne-k8s-tools/1.8/Dockerfile +++ b/OracleLinuxDevelopers/oraclelinux8/helm/3.12/Dockerfile @@ -1,11 +1,14 @@ # Copyright (c) 2024 Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. +# OCNE 1.8 - Helm 3.12 FROM ghcr.io/oracle/oraclelinux:8 RUN dnf install -y oracle-olcne-release-el8 && \ dnf config-manager --enable ol8_olcne18 ol8_addons ol8_baseos_latest ol8_appstream && \ - dnf install -y kubectl helm && \ + dnf install -y helm && \ rm -rf /var/cache/dnf -CMD ["kubectl", "--help"] \ No newline at end of file +ENTRYPOINT ["helm"] + +CMD ["version"] \ No newline at end of file diff --git a/OracleLinuxDevelopers/oraclelinux8/kubectl/1.28/Dockerfile b/OracleLinuxDevelopers/oraclelinux8/kubectl/1.28/Dockerfile new file mode 100644 index 0000000000..e584e5620b --- /dev/null +++ b/OracleLinuxDevelopers/oraclelinux8/kubectl/1.28/Dockerfile @@ -0,0 +1,14 @@ +# Copyright (c) 2024 Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. +# OCNE 1.8 - Kubectl 1.28 + +FROM ghcr.io/oracle/oraclelinux:8 + +RUN dnf install -y oracle-olcne-release-el8 && \ + dnf config-manager --enable ol8_olcne18 ol8_addons ol8_baseos_latest ol8_appstream && \ + dnf install -y kubectl && \ + rm -rf /var/cache/dnf + +ENTRYPOINT ["kubectl"] + +CMD ["--help"] \ No newline at end of file diff --git a/OracleLinuxDevelopers/oraclelinux9/ocne-k8s-tools/1.8/Dockerfile b/OracleLinuxDevelopers/oraclelinux9/helm/3.12/Dockerfile similarity index 80% rename from OracleLinuxDevelopers/oraclelinux9/ocne-k8s-tools/1.8/Dockerfile rename to OracleLinuxDevelopers/oraclelinux9/helm/3.12/Dockerfile index 3498f047cc..3623fa4758 100644 --- a/OracleLinuxDevelopers/oraclelinux9/ocne-k8s-tools/1.8/Dockerfile +++ b/OracleLinuxDevelopers/oraclelinux9/helm/3.12/Dockerfile @@ -1,11 +1,14 @@ # Copyright (c) 2024 Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. +# OCNE 1.8 - Helm 3.12 FROM ghcr.io/oracle/oraclelinux:9 RUN dnf install -y oracle-olcne-release-el9 && \ dnf config-manager --enable ol9_olcne18 ol9_addons ol9_baseos_latest ol9_appstream && \ - dnf install -y kubectl helm && \ + dnf install -y helm && \ rm -rf /var/cache/dnf -CMD ["kubectl", "--help"] \ No newline at end of file +ENTRYPOINT ["helm"] + +CMD ["version"] \ No newline at end of file diff --git a/OracleLinuxDevelopers/oraclelinux9/kubectl/1.28/Dockerfile b/OracleLinuxDevelopers/oraclelinux9/kubectl/1.28/Dockerfile new file mode 100644 index 0000000000..9bc1f0954b --- /dev/null +++ b/OracleLinuxDevelopers/oraclelinux9/kubectl/1.28/Dockerfile @@ -0,0 +1,14 @@ +# Copyright (c) 2024 Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. +# OCNE 1.8 - Kubectl 1.28 + +FROM ghcr.io/oracle/oraclelinux:9 + +RUN dnf install -y oracle-olcne-release-el9 && \ + dnf config-manager --enable ol9_olcne18 ol9_addons ol9_baseos_latest ol9_appstream && \ + dnf install -y kubectl && \ + rm -rf /var/cache/dnf + +ENTRYPOINT ["kubectl"] + +CMD ["--help"] \ No newline at end of file From d9347ab73d7f4e8e5f3b63c212904073075bdd16 Mon Sep 17 00:00:00 2001 From: Jake Torrance Date: Tue, 10 Sep 2024 11:55:58 +0000 Subject: [PATCH 4/8] Use --help instead of version as default command --- OracleLinuxDevelopers/oraclelinux8/helm/3.12/Dockerfile | 2 +- OracleLinuxDevelopers/oraclelinux9/helm/3.12/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OracleLinuxDevelopers/oraclelinux8/helm/3.12/Dockerfile b/OracleLinuxDevelopers/oraclelinux8/helm/3.12/Dockerfile index 60ffd2151d..ce331c8ffb 100644 --- a/OracleLinuxDevelopers/oraclelinux8/helm/3.12/Dockerfile +++ b/OracleLinuxDevelopers/oraclelinux8/helm/3.12/Dockerfile @@ -11,4 +11,4 @@ RUN dnf install -y oracle-olcne-release-el8 && \ ENTRYPOINT ["helm"] -CMD ["version"] \ No newline at end of file +CMD ["--help"] \ No newline at end of file diff --git a/OracleLinuxDevelopers/oraclelinux9/helm/3.12/Dockerfile b/OracleLinuxDevelopers/oraclelinux9/helm/3.12/Dockerfile index 3623fa4758..1a8d77d438 100644 --- a/OracleLinuxDevelopers/oraclelinux9/helm/3.12/Dockerfile +++ b/OracleLinuxDevelopers/oraclelinux9/helm/3.12/Dockerfile @@ -11,4 +11,4 @@ RUN dnf install -y oracle-olcne-release-el9 && \ ENTRYPOINT ["helm"] -CMD ["version"] \ No newline at end of file +CMD ["--help"] \ No newline at end of file From 655008ce4f66eaf8df6e223daed3005914baf120 Mon Sep 17 00:00:00 2001 From: Jake Torrance Date: Tue, 10 Sep 2024 14:17:33 +0000 Subject: [PATCH 5/8] Add ocne-tools with oci-cli, helm, kubectl. --- .../workflows/build-and-push-dev-images.yml | 4 ++-- .../oraclelinux8/ocne-tools/1.8/Dockerfile | 20 +++++++++++++++++++ .../oraclelinux8/ocne-tools/1.8/help.sh | 9 +++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/Dockerfile create mode 100755 OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/help.sh diff --git a/.github/workflows/build-and-push-dev-images.yml b/.github/workflows/build-and-push-dev-images.yml index 95e60f382e..18a177f379 100644 --- a/.github/workflows/build-and-push-dev-images.yml +++ b/.github/workflows/build-and-push-dev-images.yml @@ -28,13 +28,13 @@ on: required: false lang: description: List of languages to build - default: 'gcc-toolset, golang, nginx, nodejs, php, python, redis, ruby, haproxy, kubectl, helm' + default: 'gcc-toolset, golang, nginx, nodejs, php, python, redis, ruby, haproxy, kubectl, helm, ocne-tools' required: false # Default values for the builds triggered by the push event env: ol: 'oraclelinux7, oraclelinux8, oraclelinux9' - lang: 'gcc-toolset, golang, nodejs, nginx, php, python, redis, ruby, haproxy, kubectl, helm' + lang: 'gcc-toolset, golang, nodejs, nginx, php, python, redis, ruby, haproxy, kubectl, helm, ocne-tools' jobs: prepare: diff --git a/OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/Dockerfile b/OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/Dockerfile new file mode 100644 index 0000000000..3b8491018c --- /dev/null +++ b/OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/Dockerfile @@ -0,0 +1,20 @@ +# Copyright (c) 2024 Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. +# OCNE 1.8 - Helm 3.12 + +FROM ghcr.io/oracle/oci-cli:latest + +USER root + +RUN dnf install -y oracle-olcne-release-el8 && \ + dnf config-manager --enable ol8_olcne18 ol8_addons ol8_baseos_latest ol8_appstream && \ + dnf install -y helm kubectl && \ + rm -rf /var/cache/dnf + +ADD help.sh /opt/help.sh + +USER oracle + +ENTRYPOINT [] + +CMD ["/bin/bash", "/opt/help.sh"] \ No newline at end of file diff --git a/OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/help.sh b/OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/help.sh new file mode 100755 index 0000000000..298f9a1830 --- /dev/null +++ b/OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/help.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +echo "OCNE/OKE Tools" + +echo "oci-cli version: $(oci --version)" +helm version --template='helm version: {{.Version}}' +echo '' +echo "kubectl versions: " +kubectl version --client \ No newline at end of file From ef6f9594cc4a603fcac9000bcd9dcb29c00659f4 Mon Sep 17 00:00:00 2001 From: Jake Torrance Date: Wed, 11 Sep 2024 11:05:40 +0000 Subject: [PATCH 6/8] Use COPY instead of ADD --- OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/Dockerfile b/OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/Dockerfile index 3b8491018c..263e52f032 100644 --- a/OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/Dockerfile +++ b/OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/Dockerfile @@ -11,7 +11,7 @@ RUN dnf install -y oracle-olcne-release-el8 && \ dnf install -y helm kubectl && \ rm -rf /var/cache/dnf -ADD help.sh /opt/help.sh +COPY help.sh /opt/help.sh USER oracle From 302f1583d612abeabcad22013381f4340ced2737 Mon Sep 17 00:00:00 2001 From: Jake Torrance Date: Fri, 20 Sep 2024 08:58:44 +0000 Subject: [PATCH 7/8] Hadolint ignore oci-cli latest --- OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/Dockerfile b/OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/Dockerfile index 263e52f032..f660d51561 100644 --- a/OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/Dockerfile +++ b/OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/Dockerfile @@ -2,6 +2,7 @@ # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. # OCNE 1.8 - Helm 3.12 +# hadolint ignore=DL3007 FROM ghcr.io/oracle/oci-cli:latest USER root From 31accf1b35b4f3d1f17dd43b1ce811803ad9f3d2 Mon Sep 17 00:00:00 2001 From: Jake Torrance Date: Wed, 25 Sep 2024 12:53:07 +0000 Subject: [PATCH 8/8] Add copyright --- OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/help.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/help.sh b/OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/help.sh index 298f9a1830..3356c0e418 100755 --- a/OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/help.sh +++ b/OracleLinuxDevelopers/oraclelinux8/ocne-tools/1.8/help.sh @@ -1,4 +1,6 @@ #!/bin/bash +# Copyright (c) 2024 Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. echo "OCNE/OKE Tools"