From d1a2888c100bacbd4a4cab996603420a91b8fc39 Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Fri, 7 Jul 2023 11:25:55 +0200 Subject: [PATCH] [bitnami/os-shell] Release 11-debian-11-r0 (#40155) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [bitnami/os-shell] Release 11-debian-11-r0 Signed-off-by: Bitnami Containers * Add os-shell tests Signed-off-by: Carlos Rodríguez Hernández --------- Signed-off-by: Bitnami Containers Signed-off-by: Carlos Rodríguez Hernández Co-authored-by: Carlos Rodríguez Hernández --- .vib/os-shell/goss/goss.yaml | 10 ++ .vib/os-shell/goss/os-shell.yaml | 9 ++ .vib/os-shell/goss/vars.yaml | 1 + .vib/os-shell/vib-publish.json | 125 ++++++++++++++++++ .vib/os-shell/vib-verify.json | 69 ++++++++++ bitnami/os-shell/11/debian-11/Dockerfile | 31 +++++ .../os-shell/11/debian-11/docker-compose.yml | 7 + .../opt/bitnami/.bitnami_components.json | 3 + .../opt/bitnami/licenses/licenses.txt | 2 + .../prebuildfs/usr/sbin/install_packages | 27 ++++ bitnami/os-shell/11/debian-11/tags-info.yaml | 5 + bitnami/os-shell/README.md | 89 +++++++++++++ bitnami/os-shell/docker-compose.yml | 7 + 13 files changed, 385 insertions(+) create mode 100644 .vib/os-shell/goss/goss.yaml create mode 100644 .vib/os-shell/goss/os-shell.yaml create mode 100644 .vib/os-shell/goss/vars.yaml create mode 100644 .vib/os-shell/vib-publish.json create mode 100644 .vib/os-shell/vib-verify.json create mode 100644 bitnami/os-shell/11/debian-11/Dockerfile create mode 100644 bitnami/os-shell/11/debian-11/docker-compose.yml create mode 100644 bitnami/os-shell/11/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json create mode 100644 bitnami/os-shell/11/debian-11/prebuildfs/opt/bitnami/licenses/licenses.txt create mode 100755 bitnami/os-shell/11/debian-11/prebuildfs/usr/sbin/install_packages create mode 100644 bitnami/os-shell/11/debian-11/tags-info.yaml create mode 100644 bitnami/os-shell/README.md create mode 100644 bitnami/os-shell/docker-compose.yml diff --git a/.vib/os-shell/goss/goss.yaml b/.vib/os-shell/goss/goss.yaml new file mode 100644 index 000000000000..ea4e6e1ebb1c --- /dev/null +++ b/.vib/os-shell/goss/goss.yaml @@ -0,0 +1,10 @@ +# Copyright VMware, Inc. +# SPDX-License-Identifier: APACHE-2.0 + +gossfile: + # Goss tests exclusive to the current container + ../../os-shell/goss/os-shell.yaml: {} + # Load scripts from .vib/common/goss/templates + ../../common/goss/templates/check-broken-symlinks.yaml: {} + ../../common/goss/templates/check-linked-libraries.yaml: {} + ../../common/goss/templates/check-sed-in-place.yaml: {} diff --git a/.vib/os-shell/goss/os-shell.yaml b/.vib/os-shell/goss/os-shell.yaml new file mode 100644 index 000000000000..ff963ebf2eec --- /dev/null +++ b/.vib/os-shell/goss/os-shell.yaml @@ -0,0 +1,9 @@ +# Copyright VMware, Inc. +# SPDX-License-Identifier: APACHE-2.0 + +command: + check-distro-version: + exec: grep VERSION_ID /etc/os-release + exit-status: 0 + stdout: + - {{ .Env.APP_VERSION }} diff --git a/.vib/os-shell/goss/vars.yaml b/.vib/os-shell/goss/vars.yaml new file mode 100644 index 000000000000..a3c236e3c14a --- /dev/null +++ b/.vib/os-shell/goss/vars.yaml @@ -0,0 +1 @@ +root_dir: /opt/bitnami diff --git a/.vib/os-shell/vib-publish.json b/.vib/os-shell/vib-publish.json new file mode 100644 index 000000000000..51fe108dafd7 --- /dev/null +++ b/.vib/os-shell/vib-publish.json @@ -0,0 +1,125 @@ +{ + "context": { + "resources": { + "url": "{VIB_ENV_CONTAINER_URL}", + "path": "{VIB_ENV_PATH}" + }, + "runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd" + }, + "phases": { + "package": { + "actions": [ + { + "action_id": "container-image-package", + "params": { + "application": { + "details": { + "name": "{VIB_ENV_CONTAINER}", + "tag": "{VIB_ENV_TAG}" + } + }, + "architectures": [ + "linux/amd64", + "linux/arm64" + ] + } + }, + { + "action_id": "container-image-lint", + "params": { + "threshold": "error" + } + } + ] + }, + "verify": { + "actions": [ + { + "action_id": "trivy", + "params": { + "threshold": "CRITICAL", + "vuln_type": [ + "OS" + ] + } + }, + { + "action_id": "grype", + "params": { + "threshold": "CRITICAL", + "package_type": [ + "OS" + ] + } + }, + { + "action_id": "osspi-application", + "params": { + "additional_packages_file": "osspi-packages-amd64.json", + "scan_type": "BASE_OS", + "osm": { + "associated_bossd_release": "{VIB_ENV_BOSSD_RELEASE_ID}", + "product_name": "main-catalog-{VIB_ENV_CONTAINER}", + "product_version": "{VIB_ENV_APP_VERSION}-{VIB_ENV_OS_FLAVOUR}-container", + "architecture_overrides": [ + { + "architecture": "linux/amd64", + "product_version": "{VIB_ENV_APP_VERSION}-{VIB_ENV_OS_FLAVOUR}-container", + "additional_packages_file": "osspi-packages-amd64.json" + }, + { + "architecture": "linux/arm64", + "product_version": "{VIB_ENV_APP_VERSION}-{VIB_ENV_OS_FLAVOUR}-container-arm64", + "additional_packages_file": "osspi-packages-arm64.json" + } + ] + }, + "resources": { + "url": "{VIB_ENV_PACKAGES_JSON_URL}", + "path": "/{VIB_ENV_PATH}", + "authn": { + "header": "Authorization", + "token": "Bearer {VIB_ENV_GITHUB_TOKEN}" + } + } + } + }, + { + "action_id": "goss", + "params": { + "resources": { + "path": "/.vib" + }, + "tests_file": "os-shell/goss/goss.yaml", + "vars_file": "os-shell/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-os-shell" + } + } + } + } + ] + }, + "publish": { + "actions": [ + { + "action_id": "container-image-publish", + "params": { + "metadata": { + "tags": {VIB_ENV_ROLLING_TAGS} + }, + "repository": { + "kind": "OCI", + "url": "{VIB_ENV_REGISTRY_URL}", + "authn": { + "username": "{VIB_ENV_REGISTRY_USERNAME}", + "password": "{VIB_ENV_REGISTRY_PASSWORD}" + } + } + } + } + ] + } + } +} diff --git a/.vib/os-shell/vib-verify.json b/.vib/os-shell/vib-verify.json new file mode 100644 index 000000000000..8a69ef93d9e1 --- /dev/null +++ b/.vib/os-shell/vib-verify.json @@ -0,0 +1,69 @@ +{ + "context": { + "resources": { + "url": "{SHA_ARCHIVE}", + "path": "{VIB_ENV_PATH}" + }, + "runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd" + }, + "phases": { + "package": { + "actions": [ + { + "action_id": "container-image-package", + "params": { + "application": { + "details": { + "name": "{VIB_ENV_CONTAINER}", + "tag": "{VIB_ENV_TAG}" + } + } + } + }, + { + "action_id": "container-image-lint", + "params": { + "threshold": "error" + } + } + ] + }, + "verify": { + "actions": [ + { + "action_id": "trivy", + "params": { + "threshold": "CRITICAL", + "vuln_type": [ + "OS" + ] + } + }, + { + "action_id": "grype", + "params": { + "threshold": "CRITICAL", + "package_type": [ + "OS" + ] + } + }, + { + "action_id": "goss", + "params": { + "resources": { + "path": "/.vib" + }, + "tests_file": "os-shell/goss/goss.yaml", + "vars_file": "os-shell/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-os-shell" + } + } + } + } + ] + } + } +} diff --git a/bitnami/os-shell/11/debian-11/Dockerfile b/bitnami/os-shell/11/debian-11/Dockerfile new file mode 100644 index 000000000000..88c50d04c03d --- /dev/null +++ b/bitnami/os-shell/11/debian-11/Dockerfile @@ -0,0 +1,31 @@ +# Copyright VMware, Inc. +# SPDX-License-Identifier: APACHE-2.0 + +FROM docker.io/bitnami/minideb:bullseye + +ARG TARGETARCH + +LABEL org.opencontainers.image.base.name="docker.io/bitnami/minideb:bullseye" \ + org.opencontainers.image.created="2023-07-06T16:41:50Z" \ + org.opencontainers.image.description="Application packaged by VMware, Inc" \ + org.opencontainers.image.licenses="Apache-2.0" \ + org.opencontainers.image.ref.name="11-debian-11-r0" \ + org.opencontainers.image.title="os-shell" \ + org.opencontainers.image.vendor="VMware, Inc." \ + org.opencontainers.image.version="11" + +COPY prebuildfs / +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +# Install required system packages and dependencies +RUN install_packages curl procps +RUN apt-get update && apt-get upgrade -y && \ + apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives + +ENV APP_VERSION="11" \ + BITNAMI_APP_NAME="os-shell" \ + HOME="/" \ + OS_ARCH="${TARGETARCH:-amd64}" \ + OS_FLAVOUR="debian-11" \ + OS_NAME="linux" + +USER 1001 diff --git a/bitnami/os-shell/11/debian-11/docker-compose.yml b/bitnami/os-shell/11/debian-11/docker-compose.yml new file mode 100644 index 000000000000..6e836985fa69 --- /dev/null +++ b/bitnami/os-shell/11/debian-11/docker-compose.yml @@ -0,0 +1,7 @@ +# Copyright VMware, Inc. +# SPDX-License-Identifier: APACHE-2.0 + +version: '2' +services: + os-shell: + image: docker.io/bitnami/os-shell:11 diff --git a/bitnami/os-shell/11/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json b/bitnami/os-shell/11/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json new file mode 100644 index 000000000000..0e0dcd235c49 --- /dev/null +++ b/bitnami/os-shell/11/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json @@ -0,0 +1,3 @@ +{ + +} \ No newline at end of file diff --git a/bitnami/os-shell/11/debian-11/prebuildfs/opt/bitnami/licenses/licenses.txt b/bitnami/os-shell/11/debian-11/prebuildfs/opt/bitnami/licenses/licenses.txt new file mode 100644 index 000000000000..76956b38e82c --- /dev/null +++ b/bitnami/os-shell/11/debian-11/prebuildfs/opt/bitnami/licenses/licenses.txt @@ -0,0 +1,2 @@ +Bitnami containers ship with software bundles. You can find the licenses under: +/opt/bitnami/[name-of-bundle]/licenses/[bundle-version].txt diff --git a/bitnami/os-shell/11/debian-11/prebuildfs/usr/sbin/install_packages b/bitnami/os-shell/11/debian-11/prebuildfs/usr/sbin/install_packages new file mode 100755 index 000000000000..acbc3173208c --- /dev/null +++ b/bitnami/os-shell/11/debian-11/prebuildfs/usr/sbin/install_packages @@ -0,0 +1,27 @@ +#!/bin/sh +# Copyright VMware, Inc. +# SPDX-License-Identifier: APACHE-2.0 +set -eu + +n=0 +max=2 +export DEBIAN_FRONTEND=noninteractive + +until [ $n -gt $max ]; do + set +e + ( + apt-get update -qq && + apt-get install -y --no-install-recommends "$@" + ) + CODE=$? + set -e + if [ $CODE -eq 0 ]; then + break + fi + if [ $n -eq $max ]; then + exit $CODE + fi + echo "apt failed, retrying" + n=$(($n + 1)) +done +apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives diff --git a/bitnami/os-shell/11/debian-11/tags-info.yaml b/bitnami/os-shell/11/debian-11/tags-info.yaml new file mode 100644 index 000000000000..a7bb0a3ba1de --- /dev/null +++ b/bitnami/os-shell/11/debian-11/tags-info.yaml @@ -0,0 +1,5 @@ +rolling-tags: +- "11" +- "11" +- 11-debian-11 +- latest diff --git a/bitnami/os-shell/README.md b/bitnami/os-shell/README.md new file mode 100644 index 000000000000..5fbef74c9197 --- /dev/null +++ b/bitnami/os-shell/README.md @@ -0,0 +1,89 @@ +# OS Shell packaged by Bitnami + +## What is OS Shell? + +> OS Shell is a general-purpose image based on minideb. It is a minimal image well-suited to helper tasks, such as running initialization tasks in initContainers from Helm charts. + +[Overview of OS Shell](https://bitnami.com) +Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement. + +## TL;DR + +```console +docker run --name os-shell bitnami/os-shell:latest +``` + +## Why use Bitnami Images? + +* Bitnami closely tracks upstream source changes and promptly publishes new versions of this image using our automated systems. +* With Bitnami images the latest bug fixes and features are available as soon as possible. +* Bitnami containers, virtual machines and cloud images use the same components and configuration approach - making it easy to switch between formats based on your project needs. +* All our images are based on [minideb](https://github.com/bitnami/minideb) a minimalist Debian based container image which gives you a small base container image and the familiarity of a leading Linux distribution. +* All Bitnami images available in Docker Hub are signed with [Docker Content Trust (DCT)](https://docs.docker.com/engine/security/trust/content_trust/). You can use `DOCKER_CONTENT_TRUST=1` to verify the integrity of the images. +* Bitnami container images are released on a regular basis with the latest distribution packages available. + +Looking to use OS Shell in production? Try [VMware Application Catalog](https://bitnami.com/enterprise), the enterprise edition of Bitnami Application Catalog. + +## Supported tags and respective `Dockerfile` links + +Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://docs.bitnami.com/tutorials/understand-rolling-tags-containers/). + +You can see the equivalence between the different tags by taking a look at the `tags-info.yaml` file present in the branch folder, i.e `bitnami/ASSET/BRANCH/DISTRO/tags-info.yaml`. + +Subscribe to project updates by watching the [bitnami/containers GitHub repo](https://github.com/bitnami/containers). + +## Get this image + +The recommended way to get the Bitnami os-shell Docker Image is to pull the prebuilt image from the [Docker Hub Registry](https://hub.docker.com/r/bitnami/os-shell). + +```console +docker pull bitnami/os-shell:latest +``` + +To use a specific version, you can pull a versioned tag. You can view the [list of available versions](https://hub.docker.com/r/bitnami/os-shell/tags/) in the Docker Hub Registry. + +```console +docker pull bitnami/os-shell:[TAG] +``` + +If you wish, you can also build the image yourself by cloning the repository, changing to the directory containing the Dockerfile and executing the `docker build` command. Remember to replace the `APP`, `VERSION` and `OPERATING-SYSTEM` path placeholders in the example command below with the correct values. + +```console +git clone https://github.com/bitnami/containers.git +cd bitnami/APP/VERSION/OPERATING-SYSTEM +docker build -t bitnami/APP:latest . +``` + +## Configuration + +### Running commands + +To run commands inside this container you can use `docker run`, for example to execute `echo Hello world` you can follow the example below: + +```console +docker run --rm --name os-shell bitnami/os-shell:latest echo hello world +``` + +## Contributing + +We'd love for you to contribute to this container. You can request new features by creating an [issue](https://github.com/bitnami/containers/issues) or submitting a [pull request](https://github.com/bitnami/containers/pulls) with your contribution. + +## Issues + +If you encountered a problem running this container, you can file an [issue](https://github.com/bitnami/containers/issues/new/choose). For us to provide better support, be sure to fill the issue template. + +## License + +Copyright © 2023 VMware, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/bitnami/os-shell/docker-compose.yml b/bitnami/os-shell/docker-compose.yml new file mode 100644 index 000000000000..6e836985fa69 --- /dev/null +++ b/bitnami/os-shell/docker-compose.yml @@ -0,0 +1,7 @@ +# Copyright VMware, Inc. +# SPDX-License-Identifier: APACHE-2.0 + +version: '2' +services: + os-shell: + image: docker.io/bitnami/os-shell:11