├── .github ├── auto-merge.yml ├── dependabot.yml └── workflows │ ├── auto-merge-on-demand.yml │ ├── auto-merge.yml │ ├── build-and-push.yml │ ├── container-tests.yml │ └── pr-metadata.yml ├── .gitignore ├── .gitmodules ├── LICENSE ├── Makefile ├── README.md ├── base ├── .exclude-c8s ├── .exclude-centos7 ├── .exclude-rhel7 ├── Dockerfile ├── Dockerfile.c10s ├── Dockerfile.c8s ├── Dockerfile.c9s ├── Dockerfile.f38 ├── Dockerfile.f39 ├── Dockerfile.f40 ├── Dockerfile.f41 ├── Dockerfile.f42 ├── Dockerfile.fedora ├── Dockerfile.rhel10 ├── Dockerfile.rhel7 ├── Dockerfile.rhel8 ├── Dockerfile.rhel9 ├── README.md └── test │ └── run └── core ├── .exclude-c8s ├── .exclude-centos7 ├── .exclude-rhel7 ├── Dockerfile ├── Dockerfile.c10s ├── Dockerfile.c8s ├── Dockerfile.c9s ├── Dockerfile.f38 ├── Dockerfile.f39 ├── Dockerfile.f40 ├── Dockerfile.f41 ├── Dockerfile.f42 ├── Dockerfile.fedora ├── Dockerfile.rhel10 ├── Dockerfile.rhel7 ├── Dockerfile.rhel8 ├── Dockerfile.rhel9 ├── README.md ├── root └── test └── run /.github/auto-merge.yml: -------------------------------------------------------------------------------- 1 | target-branch: [] 2 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | version: 2 4 | updates: 5 | - package-ecosystem: gitsubmodule 6 | directory: / 7 | schedule: 8 | interval: weekly 9 | labels: 10 | - 'ready for review' 11 | - package-ecosystem: github-actions 12 | directory: / 13 | schedule: 14 | interval: monthly 15 | labels: 16 | - 'ready for review' 17 | -------------------------------------------------------------------------------- /.github/workflows/auto-merge-on-demand.yml: -------------------------------------------------------------------------------- 1 | name: Auto Merge Scheduled / On Demand 2 | on: 3 | schedule: 4 | # Workflow runs every 45 minutes 5 | - cron: '*/45 * * * *' 6 | workflow_dispatch: 7 | inputs: 8 | pr-number: 9 | description: 'Pull Request number/s ; when not provided, the workflow will run for all open PRs' 10 | required: true 11 | default: '0' 12 | 13 | permissions: 14 | contents: read 15 | 16 | jobs: 17 | # Get all open PRs 18 | gather-pull-requests: 19 | if: github.repository_owner == 'sclorg' 20 | runs-on: ubuntu-latest 21 | 22 | outputs: 23 | pr-numbers: ${{ steps.get-pr-numbers.outputs.result }} 24 | pr-numbers-manual: ${{ steps.parse-manual-input.outputs.result }} 25 | 26 | steps: 27 | - id: get-pr-numbers 28 | if: inputs.pr-number == '0' 29 | name: Get all open PRs 30 | uses: actions/github-script@v7 31 | with: 32 | # !FIXME: this is not working if there is more than 100 PRs opened 33 | script: | 34 | const { data: pullRequests } = await github.rest.pulls.list({ 35 | owner: context.repo.owner, 36 | repo: context.repo.repo, 37 | state: 'open', 38 | per_page: 100 39 | }); 40 | return pullRequests.map(pr => pr.number); 41 | 42 | - id: parse-manual-input 43 | if: inputs.pr-number != '0' 44 | name: Parse manual input 45 | run: | 46 | # shellcheck disable=SC2086 47 | echo "result="[ ${{ inputs.pr-number }} ]"" >> $GITHUB_OUTPUT 48 | shell: bash 49 | 50 | validate-pr: 51 | name: 'Validation of Pull Request #${{ matrix.pr-number }}' 52 | needs: [ gather-pull-requests ] 53 | runs-on: ubuntu-latest 54 | 55 | strategy: 56 | fail-fast: false 57 | matrix: 58 | pr-number: ${{ inputs.pr-number == 0 && fromJSON(needs.gather-pull-requests.outputs.pr-numbers) || fromJSON(needs.gather-pull-requests.outputs.pr-numbers-manual) }} 59 | 60 | permissions: 61 | # required for merging PRs 62 | contents: write 63 | # required for PR comments and setting labels 64 | pull-requests: write 65 | 66 | steps: 67 | - name: Auto Merge wrapper 68 | uses: sclorg/auto-merge-wrapper@v1 69 | with: 70 | pr-number: ${{ matrix.pr-number }} 71 | token: ${{ secrets.GITHUB_TOKEN }} 72 | -------------------------------------------------------------------------------- /.github/workflows/auto-merge.yml: -------------------------------------------------------------------------------- 1 | name: Auto Merge 2 | on: 3 | workflow_run: 4 | workflows: [ Gather Pull Request Metadata ] 5 | types: 6 | - completed 7 | 8 | permissions: 9 | contents: read 10 | 11 | jobs: 12 | download-metadata: 13 | if: > 14 | github.event.workflow_run.event == 'pull_request' && 15 | github.event.workflow_run.conclusion == 'success' 16 | runs-on: ubuntu-latest 17 | 18 | outputs: 19 | pr-metadata: ${{ steps.Artifact.outputs.pr-metadata-json }} 20 | 21 | steps: 22 | - id: Artifact 23 | name: Download Artifact 24 | uses: redhat-plumbers-in-action/download-artifact@v1 25 | with: 26 | name: pr-metadata 27 | 28 | auto-merge: 29 | needs: [ download-metadata ] 30 | runs-on: ubuntu-latest 31 | 32 | permissions: 33 | # required for merging PRs 34 | contents: write 35 | # required for PR comments and setting labels 36 | pull-requests: write 37 | 38 | steps: 39 | - name: Auto Merge wrapper 40 | uses: sclorg/auto-merge-wrapper@v1 41 | with: 42 | pr-metadata: ${{ needs.download-metadata.outputs.pr-metadata }} 43 | token: ${{ secrets.GITHUB_TOKEN }} 44 | -------------------------------------------------------------------------------- /.github/workflows/build-and-push.yml: -------------------------------------------------------------------------------- 1 | name: Build and push images to Quay.io registry 2 | on: 3 | push: 4 | branches: 5 | - master 6 | schedule: 7 | # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule 8 | # Schedule build to 1:00 each Tuesday 9 | - cron: '0 1 * * 2' 10 | jobs: 11 | build-and-push: 12 | # To not run in forks 13 | if: github.repository_owner == 'sclorg' 14 | name: Build and push s2i containers 15 | runs-on: ubuntu-latest 16 | strategy: 17 | fail-fast: false 18 | matrix: 19 | include: 20 | - dockerfile: "Dockerfile.c10s" 21 | registry_namespace: "sclorg" 22 | tag: "c10s" 23 | quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME" 24 | quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN" 25 | suffix: "-c10s" 26 | use_default_tags: 'true' 27 | arch: "amd64, ppc64le, s390x, arm64" 28 | 29 | - dockerfile: "Dockerfile.c9s" 30 | registry_namespace: "sclorg" 31 | tag: "c9s" 32 | quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME" 33 | quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN" 34 | suffix: "-c9s" 35 | use_default_tags: 'true' 36 | arch: "amd64, ppc64le, s390x, arm64" 37 | 38 | - dockerfile: "Dockerfile.f39" 39 | registry_namespace: "fedora" 40 | tag: "39" 41 | quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME" 42 | quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN" 43 | use_default_tags: 'false' 44 | arch: "amd64, ppc64le, s390x, arm64" 45 | 46 | - dockerfile: "Dockerfile.f40" 47 | registry_namespace: "fedora" 48 | tag: "40" 49 | quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME" 50 | quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN" 51 | use_default_tags: 'false' 52 | arch: "amd64, ppc64le, s390x, arm64" 53 | 54 | - dockerfile: "Dockerfile.f41" 55 | registry_namespace: "fedora" 56 | tag: "41" 57 | quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME" 58 | quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN" 59 | use_default_tags: 'false' 60 | arch: "amd64, ppc64le, s390x, arm64" 61 | 62 | - dockerfile: "Dockerfile.f42" 63 | registry_namespace: "fedora" 64 | tag: "42" 65 | quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME" 66 | quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN" 67 | use_default_tags: 'false' 68 | arch: "amd64, ppc64le, s390x, arm64" 69 | 70 | steps: 71 | - name: Build and push s2i-core to quay.io registry 72 | uses: sclorg/build-and-push-action@v4 73 | with: 74 | registry: "quay.io" 75 | registry_namespace: ${{ matrix.registry_namespace }} 76 | registry_username: ${{ secrets[matrix.quayio_username] }} 77 | registry_token: ${{ secrets[matrix.quayio_token] }} 78 | dockerfile: "core/${{ matrix.dockerfile }}" 79 | image_name: "s2i-core${{ matrix.suffix }}" 80 | tag: ${{ matrix.tag }} 81 | archs: ${{ matrix.arch }} 82 | readme: "core/README.md" 83 | quay_application_token: ${{ secrets.QUAY_IMAGE_SCLORG_UPDATE_DESC }} 84 | 85 | 86 | - name: Build and push s2i-base to quay.io registry 87 | uses: sclorg/build-and-push-action@v4 88 | with: 89 | registry: "quay.io" 90 | registry_namespace: ${{ matrix.registry_namespace }} 91 | registry_username: ${{ secrets[matrix.quayio_username] }} 92 | registry_token: ${{ secrets[matrix.quayio_token] }} 93 | dockerfile: "base/${{ matrix.dockerfile }}" 94 | image_name: "s2i-base${{ matrix.suffix }}" 95 | tag: ${{ matrix.tag }} 96 | use_default_tags: ${{ matrix.use_default_tags }} 97 | archs: ${{ matrix.arch }} 98 | readme: "base/README.md" 99 | quay_application_token: ${{ secrets.QUAY_IMAGE_SCLORG_UPDATE_DESC }} 100 | -------------------------------------------------------------------------------- /.github/workflows/container-tests.yml: -------------------------------------------------------------------------------- 1 | name: Container-tests by GitHub Action at Testing Farm 2 | 3 | on: 4 | issue_comment: 5 | types: 6 | - created 7 | jobs: 8 | build: 9 | name: "Container tests: ${{ matrix.version }} - ${{ matrix.os_test }}" 10 | runs-on: ubuntu-latest 11 | concurrency: 12 | group: container-${{ github.event.issue.number }}-${{ matrix.version }}-${{ matrix.os_test }} 13 | cancel-in-progress: true 14 | strategy: 15 | fail-fast: false 16 | matrix: 17 | os_test: [ "fedora", "rhel8", "rhel9", "c9s", "c10s", "rhel10" ] 18 | version: [ "core", "base" ] 19 | 20 | if: | 21 | github.event.issue.pull_request 22 | && (contains(github.event.comment.body, '[test]') || contains(github.event.comment.body, '[test-all]')) 23 | && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association) 24 | steps: 25 | - uses: sclorg/tfaga-wrapper@main 26 | with: 27 | os_test: ${{ matrix.os_test }} 28 | version: "" 29 | working_dir: ${{ matrix.version }} 30 | test_case: "container" 31 | public_api_key: ${{ secrets.TF_PUBLIC_API_KEY }} 32 | private_api_key: ${{ secrets.TF_INTERNAL_API_KEY }} 33 | 34 | -------------------------------------------------------------------------------- /.github/workflows/pr-metadata.yml: -------------------------------------------------------------------------------- 1 | name: Gather Pull Request Metadata 2 | on: 3 | pull_request: 4 | types: [ opened, reopened, synchronize ] 5 | branches: [ master ] 6 | 7 | permissions: 8 | contents: read 9 | 10 | jobs: 11 | gather-metadata: 12 | if: github.repository_owner == 'sclorg' 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - name: Repository checkout 17 | uses: actions/checkout@v4 18 | 19 | - id: Metadata 20 | name: Gather Pull Request Metadata 21 | uses: redhat-plumbers-in-action/gather-pull-request-metadata@v1 22 | 23 | - name: Upload artifact with gathered metadata 24 | uses: actions/upload-artifact@v4 25 | with: 26 | name: pr-metadata 27 | path: ${{ steps.Metadata.outputs.metadata-file }} 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # help.1 files complied by container-common-scripts from README.md files 2 | */root/help.1 3 | .image-id 4 | 5 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "common"] 2 | path = common 3 | url = https://github.com/sclorg/container-common-scripts.git 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Variables are documented in common/build.sh. 2 | BASE_IMAGE_NAME = s2i 3 | VERSIONS = core base 4 | DOCKER_BUILD_CONTEXT = .. 5 | 6 | # HACK: Ensure that 'git pull' for old clones doesn't cause confusion. 7 | # New clones should use '--recursive'. 8 | .PHONY: $(shell test -f common/common.mk || echo >&2 'Please do "git submodule update --init" first.') 9 | 10 | include common/common.mk 11 | 12 | # HACK: We need to build core first and tag it right after, so that base picks it up in the same run 13 | # We cannot just depend on tag here since tag depends on build 14 | base: core 15 | VERSIONS="base" $(script_env) $(build) 16 | 17 | core: core/root/help.1 18 | VERSIONS="core" $(script_env) $(build) 19 | VERSIONS="core" $(script_env) $(tag) 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | OpenShift base images 2 | ======================================== 3 | 4 | [![Build and push images to Quay.io registry](https://github.com/sclorg/s2i-base-container/actions/workflows/build-and-push.yml/badge.svg)](https://github.com/sclorg/s2i-base-container/actions/workflows/build-and-push.yml) 5 | 6 | Images available on Quay are: 7 | * CentOS Stream 9 [s2i-core](https://quay.io/repository/sclorg/s2i-core-c9s) 8 | * CentOS Stream 9 [s2i-base](https://quay.io/repository/sclorg/s2i-base-c9s) 9 | * CentOS Stream 10 [s2i-core](https://quay.io/repository/sclorg/s2i-core-c10s) 10 | * CentOS Stream 10 [s2i-base](https://quay.io/repository/sclorg/s2i-base-c10s) 11 | * Fedora [s2i-core](https://quay.io/repository/fedora/s2i-core) 12 | * Fedora [s2i-base](https://quay.io/repository/fedora/s2i-base) 13 | 14 | This repository contains Dockerfiles which serve as base images for various OpenShift images. 15 | 16 | Versions 17 | --------------------------------- 18 | s2i image versions currently provided are: 19 | * [core](core/README.md) - rhel8 base + s2i settings 20 | * [base](base/README.md) - s2i-core + development libraries + npm 21 | 22 | RHEL versions currently supported are: 23 | * RHEL8 24 | * RHEL9 25 | * RHEL10 26 | 27 | CentOS versions currently supported are: 28 | * CentOS Stream 9 29 | * CentOS Stream 10 30 | 31 | For more information about contributing, see 32 | [the Contribution Guidelines](https://github.com/sclorg/welcome/blob/master/contribution.md). 33 | For more information about concepts used in these container images, see the 34 | [Landing page](https://github.com/sclorg/welcome). 35 | 36 | 37 | Installation 38 | --------------- 39 | To build a S2I base image, choose either the CentOS Stream or RHEL based image: 40 | * **RHEL based image** 41 | 42 | This image is available in Red Hat Container Registry. To download it run: 43 | 44 | ``` 45 | $ podman pull registry.access.redhat.com/rhel8/s2i-base 46 | ``` 47 | 48 | Or 49 | 50 | ``` 51 | $ podman pull registry.access.redhat.com/rhel8/s2i-core 52 | ``` 53 | 54 | To build a RHEL based S2I base image, you need to run the build on a properly 55 | subscribed RHEL machine. 56 | 57 | ``` 58 | $ git clone --recursive https://github.com/sclorg/s2i-base-container.git 59 | $ cd s2i-base-container 60 | $ git submodule update --init 61 | $ make build TARGET=rhel8 VERSIONS=base 62 | ``` 63 | 64 | * **CentOS Stream based image** 65 | 66 | This image is available on DockerHub. To download it run: 67 | 68 | ``` 69 | $ podman pull quay.io/sclorg/s2i-base-c9s 70 | ``` 71 | 72 | Or 73 | 74 | ``` 75 | $ podman pull quay.io/sclorg/s2i-core-c9s 76 | ``` 77 | 78 | To build a S2I base image from scratch run: 79 | 80 | ``` 81 | $ git clone --recursive https://github.com/sclorg/s2i-base-container.git 82 | $ cd s2i-base-container 83 | $ git submodule update --init 84 | $ make build TARGET=c9s VERSIONS=base 85 | ``` 86 | 87 | Note: while the installation steps are calling `podman`, you can replace any such calls by `docker` with the same arguments. 88 | 89 | **Notice: By omitting the `VERSIONS` parameter, the build/test action will be performed 90 | on all provided versions of S2I base image.** 91 | 92 | 93 | -------------------------------------------------------------------------------- /base/.exclude-c8s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sclorg/s2i-base-container/27d8d9d87a9c352f7759e9695319fd56846742d1/base/.exclude-c8s -------------------------------------------------------------------------------- /base/.exclude-centos7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sclorg/s2i-base-container/27d8d9d87a9c352f7759e9695319fd56846742d1/base/.exclude-centos7 -------------------------------------------------------------------------------- /base/.exclude-rhel7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sclorg/s2i-base-container/27d8d9d87a9c352f7759e9695319fd56846742d1/base/.exclude-rhel7 -------------------------------------------------------------------------------- /base/Dockerfile: -------------------------------------------------------------------------------- 1 | # This image is the base image for all OpenShift v3 language container images. 2 | FROM quay.io/centos7/s2i-core-centos7 3 | 4 | ENV SUMMARY="Base image with essential libraries and tools used as a base for \ 5 | builder images like perl, python, ruby, etc." \ 6 | DESCRIPTION="The s2i-base image, being built upon s2i-core, provides any \ 7 | images layered on top of it with all the tools needed to use source-to-image \ 8 | functionality. Additionally, s2i-base also contains various libraries needed for \ 9 | it to serve as a base for other builder images, like s2i-python or s2i-ruby." \ 10 | NODEJS_SCL=rh-nodejs14 11 | 12 | LABEL summary="$SUMMARY" \ 13 | description="$DESCRIPTION" \ 14 | io.k8s.description="$DESCRIPTION" \ 15 | io.k8s.display-name="s2i base" \ 16 | com.redhat.component="s2i-base-container" \ 17 | name="centos7/s2i-base-centos7" \ 18 | version="1" \ 19 | maintainer="SoftwareCollections.org " 20 | 21 | # This is the list of basic dependencies that all language container image can 22 | # consume. 23 | RUN yum install -y centos-release-scl && \ 24 | INSTALL_PKGS="autoconf \ 25 | automake \ 26 | bzip2 \ 27 | gcc-c++ \ 28 | gd-devel \ 29 | gdb \ 30 | git \ 31 | libcurl-devel \ 32 | libxml2-devel \ 33 | libxslt-devel \ 34 | lsof \ 35 | make \ 36 | mariadb-devel \ 37 | mariadb-libs \ 38 | openssl-devel \ 39 | patch \ 40 | postgresql-devel \ 41 | procps-ng \ 42 | ${NODEJS_SCL}-npm \ 43 | sqlite-devel \ 44 | unzip \ 45 | wget \ 46 | which \ 47 | zlib-devel" && \ 48 | yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 49 | rpm -V $INSTALL_PKGS && \ 50 | yum -y clean all --enablerepo='*' 51 | -------------------------------------------------------------------------------- /base/Dockerfile.c10s: -------------------------------------------------------------------------------- 1 | # This image is the base image for all OpenShift v3 language container images. 2 | FROM quay.io/sclorg/s2i-core-c10s:c10s 3 | 4 | ENV SUMMARY="Base image with essential libraries and tools used as a base for \ 5 | builder images like perl, python, ruby, etc." \ 6 | DESCRIPTION="The s2i-base image, being built upon s2i-core, provides any \ 7 | images layered on top of it with all the tools needed to use source-to-image \ 8 | functionality. Additionally, s2i-base also contains various libraries needed for \ 9 | it to serve as a base for other builder images, like s2i-python or s2i-ruby." \ 10 | NODEJS_VER=22 \ 11 | NAME=s2i-base 12 | 13 | LABEL summary="$SUMMARY" \ 14 | description="$DESCRIPTION" \ 15 | io.k8s.description="$DESCRIPTION" \ 16 | io.k8s.display-name="s2i base" \ 17 | com.redhat.component="$NAME-container" \ 18 | name="sclorg/$NAME-c10s" \ 19 | version="$VERSION" \ 20 | maintainer="SoftwareCollections.org " 21 | 22 | # This is the list of basic dependencies that all language container image can 23 | # consume. 24 | RUN INSTALL_PKGS="autoconf \ 25 | automake \ 26 | bzip2 \ 27 | gcc-c++ \ 28 | gd-devel \ 29 | gdb \ 30 | git \ 31 | libcurl-devel \ 32 | libpq-devel \ 33 | libxml2-devel \ 34 | libxslt-devel \ 35 | lsof \ 36 | make \ 37 | mariadb-connector-c-devel \ 38 | openssl-devel \ 39 | patch \ 40 | procps-ng \ 41 | nodejs-npm \ 42 | redhat-rpm-config \ 43 | sqlite-devel \ 44 | unzip \ 45 | wget \ 46 | which \ 47 | zlib-ng-compat-devel" && \ 48 | dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 49 | rpm -V $INSTALL_PKGS && \ 50 | node -v | grep -qe "^v$NODEJS_VER\." && echo "Found VERSION $NODEJS_VER" && \ 51 | dnf -y clean all --enablerepo='*' 52 | -------------------------------------------------------------------------------- /base/Dockerfile.c8s: -------------------------------------------------------------------------------- 1 | # This image is the base image for all OpenShift v3 language container images. 2 | FROM quay.io/sclorg/s2i-core-c8s:c8s 3 | 4 | ENV SUMMARY="Base image with essential libraries and tools used as a base for \ 5 | builder images like perl, python, ruby, etc." \ 6 | DESCRIPTION="The s2i-base image, being built upon s2i-core, provides any \ 7 | images layered on top of it with all the tools needed to use source-to-image \ 8 | functionality. Additionally, s2i-base also contains various libraries needed for \ 9 | it to serve as a base for other builder images, like s2i-python or s2i-ruby." \ 10 | NODEJS_VER=20 11 | 12 | LABEL summary="$SUMMARY" \ 13 | description="$DESCRIPTION" \ 14 | io.k8s.description="$DESCRIPTION" \ 15 | io.k8s.display-name="s2i base" \ 16 | com.redhat.component="s2i-base-container" \ 17 | name="sclorg/s2i-base-c8s" \ 18 | version="1" \ 19 | maintainer="SoftwareCollections.org " 20 | 21 | # This is the list of basic dependencies that all language container image can 22 | # consume. 23 | RUN yum -y module enable nodejs:$NODEJS_VER && \ 24 | INSTALL_PKGS="autoconf \ 25 | automake \ 26 | bzip2 \ 27 | gcc-c++ \ 28 | gd-devel \ 29 | gdb \ 30 | git \ 31 | libcurl-devel \ 32 | libpq-devel \ 33 | libxml2-devel \ 34 | libxslt-devel \ 35 | lsof \ 36 | make \ 37 | mariadb-connector-c-devel \ 38 | openssl-devel \ 39 | patch \ 40 | procps-ng \ 41 | npm \ 42 | redhat-rpm-config \ 43 | sqlite-devel \ 44 | unzip \ 45 | wget \ 46 | which \ 47 | zlib-devel" && \ 48 | yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 49 | rpm -V $INSTALL_PKGS && \ 50 | node -v | grep -qe "^v$NODEJS_VER\." && echo "Found VERSION $NODEJS_VER" && \ 51 | yum -y clean all --enablerepo='*' 52 | -------------------------------------------------------------------------------- /base/Dockerfile.c9s: -------------------------------------------------------------------------------- 1 | # This image is the base image for all OpenShift v3 language container images. 2 | FROM quay.io/sclorg/s2i-core-c9s:c9s 3 | 4 | ENV SUMMARY="Base image with essential libraries and tools used as a base for \ 5 | builder images like perl, python, ruby, etc." \ 6 | DESCRIPTION="The s2i-base image, being built upon s2i-core, provides any \ 7 | images layered on top of it with all the tools needed to use source-to-image \ 8 | functionality. Additionally, s2i-base also contains various libraries needed for \ 9 | it to serve as a base for other builder images, like s2i-python or s2i-ruby." \ 10 | NODEJS_VER=20 \ 11 | NAME=s2i-base 12 | 13 | LABEL summary="$SUMMARY" \ 14 | description="$DESCRIPTION" \ 15 | io.k8s.description="$DESCRIPTION" \ 16 | io.k8s.display-name="s2i base" \ 17 | com.redhat.component="$NAME-container" \ 18 | name="sclorg/$NAME-c9s" \ 19 | version="$VERSION" \ 20 | maintainer="SoftwareCollections.org " 21 | 22 | # This is the list of basic dependencies that all language container image can 23 | # consume. 24 | RUN yum -y module enable nodejs:$NODEJS_VER && \ 25 | INSTALL_PKGS="nodejs autoconf \ 26 | automake \ 27 | bzip2 \ 28 | gcc-c++ \ 29 | gd-devel \ 30 | gdb \ 31 | git \ 32 | libcurl-devel \ 33 | libpq-devel \ 34 | libxml2-devel \ 35 | libxslt-devel \ 36 | lsof \ 37 | make \ 38 | mariadb-connector-c-devel \ 39 | openssl-devel \ 40 | patch \ 41 | procps-ng \ 42 | npm \ 43 | redhat-rpm-config \ 44 | sqlite-devel \ 45 | unzip \ 46 | wget \ 47 | which \ 48 | zlib-devel" && \ 49 | yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 50 | rpm -V $INSTALL_PKGS && \ 51 | node -v | grep -qe "^v$NODEJS_VER\." && echo "Found VERSION $NODEJS_VER" && \ 52 | yum -y clean all --enablerepo='*' 53 | -------------------------------------------------------------------------------- /base/Dockerfile.f38: -------------------------------------------------------------------------------- 1 | # This image is the base image for all OpenShift v3 language container images. 2 | FROM quay.io/fedora/s2i-core:38 3 | 4 | ENV SUMMARY="Base image with essential libraries and tools used as a base for \ 5 | builder images like perl, python, ruby, etc." \ 6 | DESCRIPTION="The s2i-base image, being built upon s2i-core, provides any \ 7 | images layered on top of it with all the tools needed to use source-to-image \ 8 | functionality. Additionally, s2i-base also contains various libraries needed for \ 9 | it to serve as a base for other builder images, like s2i-python or s2i-ruby." \ 10 | NAME=s2i-base \ 11 | ARCH=x86_64 12 | 13 | LABEL summary="$SUMMARY" \ 14 | description="$DESCRIPTION" \ 15 | io.k8s.description="$DESCRIPTION" \ 16 | io.k8s.display-name="s2i base" \ 17 | com.redhat.component="$NAME" \ 18 | name="fedora/$NAME" \ 19 | version="$VERSION" \ 20 | maintainer="SoftwareCollections.org " 21 | 22 | # This is the list of basic dependencies that all language container image can 23 | # consume. 24 | RUN INSTALL_PKGS="autoconf \ 25 | automake \ 26 | bzip2 \ 27 | gcc-c++ \ 28 | gd-devel \ 29 | gdb \ 30 | git \ 31 | libcurl-devel \ 32 | libpq-devel \ 33 | libxml2-devel \ 34 | libxslt-devel \ 35 | lsof \ 36 | make \ 37 | mariadb-connector-c-devel \ 38 | nodejs-npm \ 39 | openssl-devel \ 40 | patch \ 41 | procps-ng \ 42 | sqlite-devel \ 43 | unzip \ 44 | wget \ 45 | which \ 46 | zlib-devel" && \ 47 | dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 48 | rpm -V $INSTALL_PKGS && \ 49 | dnf clean all -y 50 | -------------------------------------------------------------------------------- /base/Dockerfile.f39: -------------------------------------------------------------------------------- 1 | # This image is the base image for all OpenShift v3 language container images. 2 | FROM quay.io/fedora/s2i-core:39 3 | 4 | ENV SUMMARY="Base image with essential libraries and tools used as a base for \ 5 | builder images like perl, python, ruby, etc." \ 6 | DESCRIPTION="The s2i-base image, being built upon s2i-core, provides any \ 7 | images layered on top of it with all the tools needed to use source-to-image \ 8 | functionality. Additionally, s2i-base also contains various libraries needed for \ 9 | it to serve as a base for other builder images, like s2i-python or s2i-ruby." \ 10 | NAME=s2i-base \ 11 | ARCH=x86_64 12 | 13 | LABEL summary="$SUMMARY" \ 14 | description="$DESCRIPTION" \ 15 | io.k8s.description="$DESCRIPTION" \ 16 | io.k8s.display-name="s2i base" \ 17 | com.redhat.component="$NAME" \ 18 | name="fedora/$NAME" \ 19 | version="$VERSION" \ 20 | maintainer="SoftwareCollections.org " 21 | 22 | # This is the list of basic dependencies that all language container image can 23 | # consume. 24 | RUN INSTALL_PKGS="autoconf \ 25 | automake \ 26 | bzip2 \ 27 | gcc-c++ \ 28 | gd-devel \ 29 | gdb \ 30 | git \ 31 | libcurl-devel \ 32 | libpq-devel \ 33 | libxml2-devel \ 34 | libxslt-devel \ 35 | lsof \ 36 | make \ 37 | mariadb-connector-c-devel \ 38 | nodejs-npm \ 39 | openssl-devel \ 40 | patch \ 41 | procps-ng \ 42 | sqlite-devel \ 43 | unzip \ 44 | wget \ 45 | which \ 46 | zlib-devel" && \ 47 | dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 48 | rpm -V $INSTALL_PKGS && \ 49 | dnf clean all -y 50 | -------------------------------------------------------------------------------- /base/Dockerfile.f40: -------------------------------------------------------------------------------- 1 | FROM quay.io/fedora/s2i-core:40 2 | 3 | ENV SUMMARY="Base image with essential libraries and tools used as a base for \ 4 | builder images like perl, python, ruby, etc." \ 5 | DESCRIPTION="The s2i-base image, being built upon s2i-core, provides any \ 6 | images layered on top of it with all the tools needed to use source-to-image \ 7 | functionality. Additionally, s2i-base also contains various libraries needed for \ 8 | it to serve as a base for other builder images, like s2i-python or s2i-ruby." \ 9 | NAME=s2i-base \ 10 | ARCH=x86_64 11 | 12 | LABEL summary="$SUMMARY" \ 13 | description="$DESCRIPTION" \ 14 | io.k8s.description="$DESCRIPTION" \ 15 | io.k8s.display-name="s2i base" \ 16 | com.redhat.component="$NAME" \ 17 | name="fedora/$NAME" \ 18 | version="$VERSION" \ 19 | maintainer="SoftwareCollections.org " 20 | 21 | # This is the list of basic dependencies that all language container image can 22 | # consume. 23 | RUN INSTALL_PKGS="autoconf \ 24 | automake \ 25 | bzip2 \ 26 | gcc-c++ \ 27 | gd-devel \ 28 | gdb \ 29 | git \ 30 | libcurl-devel \ 31 | libpq-devel \ 32 | libxml2-devel \ 33 | libxslt-devel \ 34 | lsof \ 35 | make \ 36 | mariadb-connector-c-devel \ 37 | nodejs-npm \ 38 | openssl-devel \ 39 | patch \ 40 | procps-ng \ 41 | sqlite-devel \ 42 | unzip \ 43 | wget2 \ 44 | which \ 45 | zlib-ng-compat-devel" && \ 46 | dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 47 | rpm -V $INSTALL_PKGS && \ 48 | dnf clean all -y 49 | -------------------------------------------------------------------------------- /base/Dockerfile.f41: -------------------------------------------------------------------------------- 1 | FROM quay.io/fedora/s2i-core:41 2 | 3 | ENV SUMMARY="Base image with essential libraries and tools used as a base for \ 4 | builder images like perl, python, ruby, etc." \ 5 | DESCRIPTION="The s2i-base image, being built upon s2i-core, provides any \ 6 | images layered on top of it with all the tools needed to use source-to-image \ 7 | functionality. Additionally, s2i-base also contains various libraries needed for \ 8 | it to serve as a base for other builder images, like s2i-python or s2i-ruby." \ 9 | NAME=s2i-base \ 10 | ARCH=x86_64 11 | 12 | LABEL summary="$SUMMARY" \ 13 | description="$DESCRIPTION" \ 14 | io.k8s.description="$DESCRIPTION" \ 15 | io.k8s.display-name="s2i base" \ 16 | com.redhat.component="$NAME" \ 17 | name="fedora/$NAME" \ 18 | version="$VERSION" \ 19 | maintainer="SoftwareCollections.org " 20 | 21 | # This is the list of basic dependencies that all language container image can 22 | # consume. 23 | RUN INSTALL_PKGS="autoconf \ 24 | automake \ 25 | bzip2 \ 26 | gcc-c++ \ 27 | gd-devel \ 28 | gdb \ 29 | git \ 30 | libcurl-devel \ 31 | libpq-devel \ 32 | libxml2-devel \ 33 | libxslt-devel \ 34 | lsof \ 35 | make \ 36 | mariadb-connector-c-devel \ 37 | nodejs-npm \ 38 | openssl-devel \ 39 | patch \ 40 | procps-ng \ 41 | sqlite-devel \ 42 | unzip \ 43 | wget2 \ 44 | which \ 45 | zlib-ng-compat-devel" && \ 46 | dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 47 | rpm -V $INSTALL_PKGS && \ 48 | dnf clean all -y 49 | -------------------------------------------------------------------------------- /base/Dockerfile.f42: -------------------------------------------------------------------------------- 1 | FROM quay.io/fedora/s2i-core:42 2 | 3 | ENV SUMMARY="Base image with essential libraries and tools used as a base for \ 4 | builder images like perl, python, ruby, etc." \ 5 | DESCRIPTION="The s2i-base image, being built upon s2i-core, provides any \ 6 | images layered on top of it with all the tools needed to use source-to-image \ 7 | functionality. Additionally, s2i-base also contains various libraries needed for \ 8 | it to serve as a base for other builder images, like s2i-python or s2i-ruby." \ 9 | NAME=s2i-base \ 10 | ARCH=x86_64 11 | 12 | LABEL summary="$SUMMARY" \ 13 | description="$DESCRIPTION" \ 14 | io.k8s.description="$DESCRIPTION" \ 15 | io.k8s.display-name="s2i base" \ 16 | com.redhat.component="$NAME" \ 17 | name="fedora/$NAME" \ 18 | version="$VERSION" \ 19 | maintainer="SoftwareCollections.org " 20 | 21 | # This is the list of basic dependencies that all language container image can 22 | # consume. 23 | RUN INSTALL_PKGS="autoconf \ 24 | automake \ 25 | bzip2 \ 26 | gcc-c++ \ 27 | gd-devel \ 28 | gdb \ 29 | git \ 30 | libcurl-devel \ 31 | libpq-devel \ 32 | libxml2-devel \ 33 | libxslt-devel \ 34 | lsof \ 35 | make \ 36 | mariadb-connector-c-devel \ 37 | nodejs-npm \ 38 | openssl-devel \ 39 | patch \ 40 | procps-ng \ 41 | sqlite-devel \ 42 | unzip \ 43 | wget2 \ 44 | which \ 45 | zlib-ng-compat-devel" && \ 46 | dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 47 | rpm -V $INSTALL_PKGS && \ 48 | dnf clean all -y 49 | -------------------------------------------------------------------------------- /base/Dockerfile.fedora: -------------------------------------------------------------------------------- 1 | Dockerfile.f42 -------------------------------------------------------------------------------- /base/Dockerfile.rhel10: -------------------------------------------------------------------------------- 1 | # This image is the base image for all OpenShift v3 language container images. 2 | FROM ubi10/s2i-core 3 | 4 | ENV SUMMARY="Base image with essential libraries and tools used as a base for \ 5 | builder images like perl, python, ruby, etc." \ 6 | DESCRIPTION="The s2i-base image, being built upon s2i-core, provides any \ 7 | images layered on top of it with all the tools needed to use source-to-image \ 8 | functionality. Additionally, s2i-base also contains various libraries needed for \ 9 | it to serve as a base for other builder images, like s2i-python or s2i-ruby." \ 10 | NODEJS_VER=22 \ 11 | NAME=s2i-base 12 | 13 | LABEL summary="$SUMMARY" \ 14 | description="$DESCRIPTION" \ 15 | io.k8s.description="$DESCRIPTION" \ 16 | io.k8s.display-name="s2i base" \ 17 | io.openshift.tags="s2i-base rhel10" \ 18 | com.redhat.component="s2i-base-container" \ 19 | name="ubi10/s2i-base" \ 20 | version="1" \ 21 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" 22 | 23 | # This is the list of basic dependencies that all language container image can 24 | # consume. 25 | RUN INSTALL_PKGS="autoconf \ 26 | automake \ 27 | bzip2 \ 28 | gcc-c++ \ 29 | gd-devel \ 30 | gdb \ 31 | git \ 32 | libcurl-devel \ 33 | libpq-devel \ 34 | libxml2-devel \ 35 | libxslt-devel \ 36 | lsof \ 37 | make \ 38 | mariadb-connector-c-devel \ 39 | openssl-devel \ 40 | patch \ 41 | procps-ng \ 42 | nodejs-npm \ 43 | redhat-rpm-config \ 44 | sqlite-devel \ 45 | unzip \ 46 | wget \ 47 | which \ 48 | zlib-ng-compat-devel" && \ 49 | dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 50 | rpm -V $INSTALL_PKGS && \ 51 | node -v | grep -qe "^v$NODEJS_VER\." && echo "Found VERSION $NODEJS_VER" && \ 52 | dnf -y clean all --enablerepo='*' 53 | -------------------------------------------------------------------------------- /base/Dockerfile.rhel7: -------------------------------------------------------------------------------- 1 | # This image is the base image for all OpenShift v3 language container images. 2 | FROM rhscl/s2i-core-rhel7 3 | 4 | ENV SUMMARY="Base image with essential libraries and tools used as a base for \ 5 | builder images like perl, python, ruby, etc." \ 6 | DESCRIPTION="The s2i-base image, being built upon s2i-core, provides any \ 7 | images layered on top of it with all the tools needed to use source-to-image \ 8 | functionality. Additionally, s2i-base also contains various libraries needed for \ 9 | it to serve as a base for other builder images, like s2i-python or s2i-ruby." \ 10 | NODEJS_SCL=rh-nodejs14 11 | 12 | LABEL summary="$SUMMARY" \ 13 | description="$DESCRIPTION" \ 14 | io.k8s.description="$DESCRIPTION" \ 15 | io.k8s.display-name="s2i base" \ 16 | com.redhat.component="s2i-base-container" \ 17 | name="rhscl/s2i-base-rhel7" \ 18 | version="1" \ 19 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" 20 | 21 | # This is the list of basic dependencies that all language container image can 22 | # consume. 23 | RUN prepare-yum-repositories rhel-server-rhscl-7-rpms && \ 24 | INSTALL_PKGS="autoconf \ 25 | automake \ 26 | bzip2 \ 27 | gcc-c++ \ 28 | gd-devel \ 29 | gdb \ 30 | git \ 31 | libcurl-devel \ 32 | libxml2-devel \ 33 | libxslt-devel \ 34 | lsof \ 35 | make \ 36 | mariadb-devel \ 37 | mariadb-libs \ 38 | openssl-devel \ 39 | patch \ 40 | postgresql-devel \ 41 | procps-ng \ 42 | ${NODEJS_SCL}-npm \ 43 | sqlite-devel \ 44 | unzip \ 45 | wget \ 46 | which \ 47 | zlib-devel" && \ 48 | yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 49 | rpm -V $INSTALL_PKGS && \ 50 | yum -y clean all --enablerepo='*' 51 | -------------------------------------------------------------------------------- /base/Dockerfile.rhel8: -------------------------------------------------------------------------------- 1 | # This image is the base image for all OpenShift v3 language container images. 2 | FROM ubi8/s2i-core 3 | 4 | ENV SUMMARY="Base image with essential libraries and tools used as a base for \ 5 | builder images like perl, python, ruby, etc." \ 6 | DESCRIPTION="The s2i-base image, being built upon s2i-core, provides any \ 7 | images layered on top of it with all the tools needed to use source-to-image \ 8 | functionality. Additionally, s2i-base also contains various libraries needed for \ 9 | it to serve as a base for other builder images, like s2i-python or s2i-ruby." \ 10 | NODEJS_VER=20 11 | 12 | LABEL summary="$SUMMARY" \ 13 | description="$DESCRIPTION" \ 14 | io.k8s.description="$DESCRIPTION" \ 15 | io.k8s.display-name="s2i base" \ 16 | com.redhat.component="s2i-base-container" \ 17 | name="ubi8/s2i-base" \ 18 | version="1" \ 19 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" 20 | 21 | # This is the list of basic dependencies that all language container image can 22 | # consume. 23 | RUN yum -y module enable nodejs:$NODEJS_VER && \ 24 | INSTALL_PKGS="autoconf \ 25 | automake \ 26 | bzip2 \ 27 | gcc-c++ \ 28 | gd-devel \ 29 | gdb \ 30 | git \ 31 | libcurl-devel \ 32 | libpq-devel \ 33 | libxml2-devel \ 34 | libxslt-devel \ 35 | lsof \ 36 | make \ 37 | mariadb-connector-c-devel \ 38 | openssl-devel \ 39 | patch \ 40 | procps-ng \ 41 | npm \ 42 | redhat-rpm-config \ 43 | sqlite-devel \ 44 | unzip \ 45 | wget \ 46 | which \ 47 | zlib-devel" && \ 48 | yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 49 | rpm -V $INSTALL_PKGS && \ 50 | node -v | grep -qe "^v$NODEJS_VER\." && echo "Found VERSION $NODEJS_VER" && \ 51 | yum -y clean all --enablerepo='*' 52 | -------------------------------------------------------------------------------- /base/Dockerfile.rhel9: -------------------------------------------------------------------------------- 1 | # This image is the base image for all OpenShift v3 language container images. 2 | FROM ubi9/s2i-core 3 | 4 | ENV SUMMARY="Base image with essential libraries and tools used as a base for \ 5 | builder images like perl, python, ruby, etc." \ 6 | DESCRIPTION="The s2i-base image, being built upon s2i-core, provides any \ 7 | images layered on top of it with all the tools needed to use source-to-image \ 8 | functionality. Additionally, s2i-base also contains various libraries needed for \ 9 | it to serve as a base for other builder images, like s2i-python or s2i-ruby." \ 10 | NODEJS_VER=20 11 | 12 | LABEL summary="$SUMMARY" \ 13 | description="$DESCRIPTION" \ 14 | io.k8s.description="$DESCRIPTION" \ 15 | io.k8s.display-name="s2i base" \ 16 | io.openshift.tags="s2i-base rhel9" \ 17 | com.redhat.component="s2i-base-container" \ 18 | name="ubi9/s2i-base" \ 19 | version="1" \ 20 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" 21 | 22 | # This is the list of basic dependencies that all language container image can 23 | # consume. 24 | RUN yum -y module enable nodejs:$NODEJS_VER && \ 25 | INSTALL_PKGS="autoconf \ 26 | automake \ 27 | bzip2 \ 28 | gcc-c++ \ 29 | gd-devel \ 30 | gdb \ 31 | git \ 32 | libcurl-devel \ 33 | libpq-devel \ 34 | libxml2-devel \ 35 | libxslt-devel \ 36 | lsof \ 37 | make \ 38 | mariadb-connector-c-devel \ 39 | openssl-devel \ 40 | patch \ 41 | procps-ng \ 42 | npm \ 43 | redhat-rpm-config \ 44 | sqlite-devel \ 45 | unzip \ 46 | wget \ 47 | which \ 48 | zlib-devel" && \ 49 | yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 50 | rpm -V $INSTALL_PKGS && \ 51 | node -v | grep -qe "^v$NODEJS_VER\." && echo "Found VERSION $NODEJS_VER" && \ 52 | yum -y clean all --enablerepo='*' 53 | -------------------------------------------------------------------------------- /base/README.md: -------------------------------------------------------------------------------- 1 | OpenShift base images 2 | ======================================== 3 | 4 | This repository contains Dockerfiles for images which serve as base images with all the 5 | essential libraries and tools needed for OpenShift language images, for example: 6 | 7 | * [s2i-ruby](https://github.com/sclorg/s2i-ruby-container) 8 | * [s2i-nodejs](https://github.com/sclorg/s2i-nodejs-container) 9 | * [s2i-python](https://github.com/sclorg/s2i-python-container) 10 | * [s2i-perl](https://github.com/sclorg/s2i-perl-container) 11 | * [s2i-php](https://github.com/sclorg/s2i-php-container) 12 | 13 | This container image also installs several development libraries, that are 14 | often required in the builder images above. It also includes NPM package manager. 15 | Sharing those development packages in a common layer saves disk space and 16 | improves pulling speed. 17 | 18 | NPM, a package manager for Node.js, offers a pleasant way to install JavaScript 19 | libraries, that are often needed as static files for various web applications. 20 | In order to offer good experience for web developers, the NPM package manager 21 | is also installed in the image. 22 | 23 | For containers where the development libraries and NPM package manager are not 24 | necessary, users are advised to use the s2i-core variant of this container image. 25 | 26 | 27 | Description 28 | ----------- 29 | 30 | OpenShift S2I images use [Software Collections](https://www.softwarecollections.org/en/) 31 | packages to provide the latest versions of various software. 32 | The SCL packages are released more frequently than the RHEL or CentOS systems, 33 | which are unlikely to change for several years. 34 | We rely on RHEL and CentOS for base images, on the other hand, 35 | because those are stable, supported, and secure platforms. 36 | 37 | Normally, SCL requires manual operation to enable the collection you want to use. 38 | This is burdensome and can be prone to error. 39 | The OpenShift S2I approach is to set Bash environment variables that 40 | serve to automatically enable the desired collection: 41 | 42 | * `BASH_ENV`: enables the collection for all non-interactive Bash sessions 43 | * `ENV`: enables the collection for all invocations of `/bin/sh` 44 | * `PROMPT_COMMAND`: enables the collection in interactive shell 45 | 46 | Two examples: 47 | * If you specify `BASH_ENV`, then all your `#!/bin/bash` scripts 48 | do not need to call `scl enable`. 49 | * If you specify `PROMPT_COMMAND`, then on execution of the 50 | `podman exec ... /bin/bash` command, the collection will be automatically enabled. 51 | 52 | *Note*: 53 | Executables in Software Collections packages (e.g., `ruby`) 54 | are not directly in a directory named in the `PATH` environment variable. 55 | This means that you cannot do: 56 | 57 | $ podman exec ... ruby 58 | 59 | but must instead do: 60 | 61 | $ podman exec ... /bin/bash -c ruby 62 | 63 | The `/bin/bash -c`, along with the setting the appropriate environment variable, 64 | ensures the correct `ruby` executable is found and invoked. 65 | 66 | Note: while the examples in this README are calling `podman`, you can replace any such calls by `docker` with the same arguments 67 | 68 | Usage 69 | ------------------------ 70 | Choose either the CentOS Stream or RHEL based image: 71 | * **RHEL8 base image** 72 | 73 | To build a RHEL8 based image, you need to build it on properly subscribed RHEL machine. 74 | 75 | ``` 76 | $ git clone --recursive https://github.com/sclorg/s2i-base-container.git 77 | $ cd s2i-base-container 78 | $ make build VERSIONS=base TARGET=rhel8 79 | ``` 80 | 81 | * **CentOS Stream 9 base image** 82 | 83 | This image is available on DockerHub. To download it run: 84 | 85 | ```console 86 | podman pull quay.io/sclorg/s2i-base-c9s 87 | ``` 88 | 89 | To build a Base image from scratch run: 90 | 91 | ``` 92 | $ git clone --recursive https://github.com/sclorg/s2i-base-container.git 93 | $ cd s2i-base-container 94 | $ make build VERSIONS=base TARGET=c9s 95 | ``` 96 | 97 | **Notice: By omitting the `VERSION` parameter, the build/test action will be performed 98 | on all provided versions of s2i image.** 99 | 100 | 101 | See also 102 | -------- 103 | Dockerfile and other sources are available on https://github.com/sclorg/s2i-base-container. 104 | In that repository you also can find another variants of S2I base Dockerfiles. 105 | The Dockerfile for RHEL8 is called Dockerfile.rhel8, the Dockerfile for RHEL9 is called Dockerfile.rhel9, 106 | the Dockerfile for RHEL10 is called Dockerfile.rhel10, 107 | the Dockerfile for CentOS Stream 9 is called Dockerfile.c9s, the Dockerfile for CentOS Stream 10 is called Dockerfile.c10s, 108 | and the Dockerfile for Fedora is Dockerfile.fedora. 109 | -------------------------------------------------------------------------------- /base/test/run: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # The 'run' performs a simple test that verifies that STI image. 4 | # The main focus is that the image prints out the base-usage properly. 5 | # 6 | # IMAGE_NAME specifies a name of the candidate image used for testing. 7 | # The image has to be available before this script is executed. 8 | # 9 | test -n "${IMAGE_NAME-}" || { echo 'make sure $IMAGE_NAME is defined'; exit 1; } 10 | 11 | test_docker_run_usage() { 12 | echo "Testing 'docker run' usage..." 13 | docker run --rm ${IMAGE_NAME} &>/dev/null 14 | } 15 | 16 | check_result() { 17 | local result="$1" 18 | if [[ "$result" != "0" ]]; then 19 | echo "STI image '${IMAGE_NAME}' test FAILED (exit code: ${result})" 20 | exit $result 21 | fi 22 | } 23 | 24 | # Verify the 'usage' script is working properly when running the base image with 'docker run ...' 25 | test_docker_run_usage 26 | check_result $? 27 | -------------------------------------------------------------------------------- /core/.exclude-c8s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sclorg/s2i-base-container/27d8d9d87a9c352f7759e9695319fd56846742d1/core/.exclude-c8s -------------------------------------------------------------------------------- /core/.exclude-centos7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sclorg/s2i-base-container/27d8d9d87a9c352f7759e9695319fd56846742d1/core/.exclude-centos7 -------------------------------------------------------------------------------- /core/.exclude-rhel7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sclorg/s2i-base-container/27d8d9d87a9c352f7759e9695319fd56846742d1/core/.exclude-rhel7 -------------------------------------------------------------------------------- /core/Dockerfile: -------------------------------------------------------------------------------- 1 | # This image is the base image for all s2i configurable container images. 2 | FROM registry.centos.org/centos/centos:7 3 | 4 | ENV SUMMARY="Base image which allows using of source-to-image." \ 5 | DESCRIPTION="The s2i-core image provides any images layered on top of it \ 6 | with all the tools needed to use source-to-image functionality while keeping \ 7 | the image size as small as possible." 8 | 9 | LABEL summary="$SUMMARY" \ 10 | description="$DESCRIPTION" \ 11 | io.k8s.description="$DESCRIPTION" \ 12 | io.k8s.display-name="s2i core" \ 13 | io.openshift.s2i.scripts-url=image:///usr/libexec/s2i \ 14 | io.s2i.scripts-url=image:///usr/libexec/s2i \ 15 | com.redhat.component="s2i-core-container" \ 16 | name="centos7/s2i-core-centos7" \ 17 | version="1" \ 18 | maintainer="SoftwareCollections.org " 19 | 20 | ENV \ 21 | # DEPRECATED: Use above LABEL instead, because this will be removed in future versions. 22 | STI_SCRIPTS_URL=image:///usr/libexec/s2i \ 23 | # Path to be used in other layers to place s2i scripts into 24 | STI_SCRIPTS_PATH=/usr/libexec/s2i \ 25 | APP_ROOT=/opt/app-root \ 26 | # The $HOME is not set by default, but some applications needs this variable 27 | HOME=/opt/app-root/src \ 28 | PATH=/opt/app-root/src/bin:/opt/app-root/bin:$PATH \ 29 | PLATFORM="el7" 30 | 31 | 32 | # When bash is started non-interactively, to run a shell script, for example it 33 | # looks for this variable and source the content of this file. This will enable 34 | # the SCL for all scripts without need to do 'scl enable'. 35 | ENV BASH_ENV=${APP_ROOT}/etc/scl_enable \ 36 | ENV=${APP_ROOT}/etc/scl_enable \ 37 | PROMPT_COMMAND=". ${APP_ROOT}/etc/scl_enable" 38 | 39 | # This is the list of basic dependencies that all language container image can 40 | # consume. 41 | # Also setup the 'openshift' user that is used for the build execution and for the 42 | # application runtime execution. 43 | # TODO: Use better UID and GID values 44 | RUN rpmkeys --import file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 && \ 45 | INSTALL_PKGS="bsdtar \ 46 | findutils \ 47 | gettext \ 48 | groff-base \ 49 | rsync \ 50 | scl-utils \ 51 | tar \ 52 | unzip \ 53 | yum-utils" && \ 54 | mkdir -p ${HOME}/.pki/nssdb && \ 55 | chown -R 1001:0 ${HOME}/.pki && \ 56 | yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 57 | rpm -V $INSTALL_PKGS && \ 58 | yum -y clean all --enablerepo='*' 59 | 60 | # Copy extra files to the image. 61 | COPY ./core/root/ / 62 | 63 | # Directory with the sources is set as the working directory so all STI scripts 64 | # can execute relative to this path. 65 | WORKDIR ${HOME} 66 | 67 | ENTRYPOINT ["container-entrypoint"] 68 | CMD ["base-usage"] 69 | 70 | # Reset permissions of modified directories and add default user 71 | RUN rpm-file-permissions && \ 72 | useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \ 73 | chown -R 1001:0 ${APP_ROOT} 74 | -------------------------------------------------------------------------------- /core/Dockerfile.c10s: -------------------------------------------------------------------------------- 1 | # This image is the base image for all s2i configurable container images. 2 | FROM quay.io/centos/centos:stream10 3 | 4 | ENV SUMMARY="Base image which allows using of source-to-image." \ 5 | DESCRIPTION="The s2i-core image provides any images layered on top of it \ 6 | with all the tools needed to use source-to-image functionality while keeping \ 7 | the image size as small as possible." \ 8 | NAME=s2i-core \ 9 | VERSION=10 10 | 11 | LABEL summary="$SUMMARY" \ 12 | description="$DESCRIPTION" \ 13 | io.k8s.description="$DESCRIPTION" \ 14 | io.k8s.display-name="s2i core" \ 15 | io.openshift.s2i.scripts-url=image:///usr/libexec/s2i \ 16 | io.s2i.scripts-url=image:///usr/libexec/s2i \ 17 | com.redhat.component="$NAME-container" \ 18 | name="sclorg/$NAME-c10s" \ 19 | version="$VERSION" \ 20 | maintainer="SoftwareCollections.org " 21 | 22 | ENV \ 23 | # DEPRECATED: Use above LABEL instead, because this will be removed in future versions. 24 | STI_SCRIPTS_URL=image:///usr/libexec/s2i \ 25 | # Path to be used in other layers to place s2i scripts into 26 | STI_SCRIPTS_PATH=/usr/libexec/s2i \ 27 | APP_ROOT=/opt/app-root \ 28 | # The $HOME is not set by default, but some applications needs this variable 29 | HOME=/opt/app-root/src \ 30 | PATH=/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ 31 | PLATFORM="el10" 32 | 33 | # This is the list of basic dependencies that all language container image can 34 | # consume. 35 | # Also setup the 'openshift' user that is used for the build execution and for the 36 | # application runtime execution. 37 | # TODO: Use better UID and GID values 38 | 39 | RUN INSTALL_PKGS="bsdtar \ 40 | findutils \ 41 | gettext \ 42 | glibc-langpack-en \ 43 | groff-base \ 44 | rsync \ 45 | tar \ 46 | unzip \ 47 | yum" && \ 48 | mkdir -p ${HOME}/.pki/nssdb && \ 49 | chown -R 1001:0 ${HOME}/.pki && \ 50 | dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 51 | rpm -V $INSTALL_PKGS && \ 52 | dnf -y clean all --enablerepo='*' 53 | 54 | # Copy extra files to the image. 55 | COPY ./core/root/ / 56 | 57 | # Directory with the sources is set as the working directory so all STI scripts 58 | # can execute relative to this path. 59 | WORKDIR ${HOME} 60 | 61 | ENTRYPOINT ["container-entrypoint"] 62 | CMD ["base-usage"] 63 | 64 | # Reset permissions of modified directories and add default user 65 | RUN rpm-file-permissions && \ 66 | useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \ 67 | chown -R 1001:0 ${APP_ROOT} 68 | -------------------------------------------------------------------------------- /core/Dockerfile.c8s: -------------------------------------------------------------------------------- 1 | # This image is the base image for all s2i configurable container images. 2 | FROM quay.io/centos/centos:stream8 3 | 4 | ENV SUMMARY="Base image which allows using of source-to-image." \ 5 | DESCRIPTION="The s2i-core image provides any images layered on top of it \ 6 | with all the tools needed to use source-to-image functionality while keeping \ 7 | the image size as small as possible." 8 | 9 | LABEL summary="$SUMMARY" \ 10 | description="$DESCRIPTION" \ 11 | io.k8s.description="$DESCRIPTION" \ 12 | io.k8s.display-name="s2i core" \ 13 | io.openshift.s2i.scripts-url=image:///usr/libexec/s2i \ 14 | io.s2i.scripts-url=image:///usr/libexec/s2i \ 15 | com.redhat.component="s2i-core-container" \ 16 | name="sclorg/s2i-core-c8s" \ 17 | version="1" \ 18 | maintainer="SoftwareCollections.org " 19 | 20 | ENV \ 21 | # DEPRECATED: Use above LABEL instead, because this will be removed in future versions. 22 | STI_SCRIPTS_URL=image:///usr/libexec/s2i \ 23 | # Path to be used in other layers to place s2i scripts into 24 | STI_SCRIPTS_PATH=/usr/libexec/s2i \ 25 | APP_ROOT=/opt/app-root \ 26 | # The $HOME is not set by default, but some applications needs this variable 27 | HOME=/opt/app-root/src \ 28 | PATH=/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ 29 | PLATFORM="el8" 30 | 31 | # This is the list of basic dependencies that all language container image can 32 | # consume. 33 | # Also setup the 'openshift' user that is used for the build execution and for the 34 | # application runtime execution. 35 | # TODO: Use better UID and GID values 36 | 37 | RUN INSTALL_PKGS="bsdtar \ 38 | findutils \ 39 | groff-base \ 40 | glibc-locale-source \ 41 | glibc-langpack-en \ 42 | gettext \ 43 | rsync \ 44 | scl-utils \ 45 | tar \ 46 | unzip \ 47 | xz \ 48 | yum" && \ 49 | mkdir -p ${HOME}/.pki/nssdb && \ 50 | chown -R 1001:0 ${HOME}/.pki && \ 51 | yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 52 | rpm -V $INSTALL_PKGS && \ 53 | yum -y clean all --enablerepo='*' 54 | 55 | # Copy extra files to the image. 56 | COPY ./core/root/ / 57 | 58 | # Directory with the sources is set as the working directory so all STI scripts 59 | # can execute relative to this path. 60 | WORKDIR ${HOME} 61 | 62 | ENTRYPOINT ["container-entrypoint"] 63 | CMD ["base-usage"] 64 | 65 | # Reset permissions of modified directories and add default user 66 | RUN rpm-file-permissions && \ 67 | useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \ 68 | chown -R 1001:0 ${APP_ROOT} 69 | -------------------------------------------------------------------------------- /core/Dockerfile.c9s: -------------------------------------------------------------------------------- 1 | # This image is the base image for all s2i configurable container images. 2 | FROM quay.io/centos/centos:stream9 3 | 4 | ENV SUMMARY="Base image which allows using of source-to-image." \ 5 | DESCRIPTION="The s2i-core image provides any images layered on top of it \ 6 | with all the tools needed to use source-to-image functionality while keeping \ 7 | the image size as small as possible." \ 8 | NAME=s2i-core \ 9 | VERSION=9 10 | 11 | LABEL summary="$SUMMARY" \ 12 | description="$DESCRIPTION" \ 13 | io.k8s.description="$DESCRIPTION" \ 14 | io.k8s.display-name="s2i core" \ 15 | io.openshift.s2i.scripts-url=image:///usr/libexec/s2i \ 16 | io.s2i.scripts-url=image:///usr/libexec/s2i \ 17 | com.redhat.component="$NAME-container" \ 18 | name="sclorg/$NAME-c9s" \ 19 | version="$VERSION" \ 20 | maintainer="SoftwareCollections.org " 21 | 22 | ENV \ 23 | # DEPRECATED: Use above LABEL instead, because this will be removed in future versions. 24 | STI_SCRIPTS_URL=image:///usr/libexec/s2i \ 25 | # Path to be used in other layers to place s2i scripts into 26 | STI_SCRIPTS_PATH=/usr/libexec/s2i \ 27 | APP_ROOT=/opt/app-root \ 28 | # The $HOME is not set by default, but some applications needs this variable 29 | HOME=/opt/app-root/src \ 30 | PATH=/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ 31 | PLATFORM="el9" 32 | 33 | # This is the list of basic dependencies that all language container image can 34 | # consume. 35 | # Also setup the 'openshift' user that is used for the build execution and for the 36 | # application runtime execution. 37 | # TODO: Use better UID and GID values 38 | 39 | RUN INSTALL_PKGS="bsdtar \ 40 | findutils \ 41 | gettext \ 42 | glibc-langpack-en \ 43 | groff-base \ 44 | glibc-locale-source \ 45 | rsync \ 46 | scl-utils \ 47 | tar \ 48 | unzip \ 49 | xz \ 50 | yum" && \ 51 | mkdir -p ${HOME}/.pki/nssdb && \ 52 | chown -R 1001:0 ${HOME}/.pki && \ 53 | dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 54 | rpm -V $INSTALL_PKGS && \ 55 | dnf -y clean all --enablerepo='*' 56 | 57 | # Copy extra files to the image. 58 | COPY ./core/root/ / 59 | 60 | # Directory with the sources is set as the working directory so all STI scripts 61 | # can execute relative to this path. 62 | WORKDIR ${HOME} 63 | 64 | ENTRYPOINT ["container-entrypoint"] 65 | CMD ["base-usage"] 66 | 67 | # Reset permissions of modified directories and add default user 68 | RUN rpm-file-permissions && \ 69 | useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \ 70 | chown -R 1001:0 ${APP_ROOT} 71 | -------------------------------------------------------------------------------- /core/Dockerfile.f38: -------------------------------------------------------------------------------- 1 | # This image is the base image for all s2i configurable container images. 2 | FROM quay.io/fedora/fedora:38 3 | 4 | ENV SUMMARY="Base image which allows using of source-to-image." \ 5 | DESCRIPTION="The s2i-core image provides any images layered on top of it \ 6 | with all the tools needed to use source-to-image functionality while keeping \ 7 | the image size as small as possible." \ 8 | NAME=s2i-core \ 9 | VERSION=38 \ 10 | ARCH=x86_64 11 | 12 | LABEL summary="$SUMMARY" \ 13 | description="$DESCRIPTION" \ 14 | io.k8s.description="$DESCRIPTION" \ 15 | io.k8s.display-name="s2i core" \ 16 | io.openshift.s2i.scripts-url=image:///usr/libexec/s2i \ 17 | io.s2i.scripts-url=image:///usr/libexec/s2i \ 18 | com.redhat.component="$NAME" \ 19 | name="fedora/$NAME" \ 20 | version="$VERSION" \ 21 | usage="This image is supposed to be used as a base image for other images that support source-to-image" \ 22 | maintainer="SoftwareCollections.org " 23 | 24 | ENV \ 25 | # DEPRECATED: Use above LABEL instead, because this will be removed in future versions. 26 | STI_SCRIPTS_URL=image:///usr/libexec/s2i \ 27 | # Path to be used in other layers to place s2i scripts into 28 | STI_SCRIPTS_PATH=/usr/libexec/s2i \ 29 | APP_ROOT=/opt/app-root \ 30 | # The $HOME is not set by default, but some applications needs this variable 31 | HOME=/opt/app-root/src \ 32 | PATH=/opt/app-root/src/bin:/opt/app-root/bin:$PATH \ 33 | PLATFORM="fedora" 34 | 35 | # This is the list of basic dependencies that all language container image can 36 | # consume. 37 | # Also setup the 'openshift' user that is used for the build execution and for the 38 | # application runtime execution. 39 | # TODO: Use better UID and GID values 40 | RUN INSTALL_PKGS="bsdtar \ 41 | findutils \ 42 | gettext \ 43 | glibc-langpack-en \ 44 | groff-base \ 45 | rsync \ 46 | tar \ 47 | unzip" && \ 48 | mkdir -p ${HOME}/.pki/nssdb && \ 49 | chown -R 1001:0 ${HOME}/.pki && \ 50 | dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 51 | rpm -V $INSTALL_PKGS && \ 52 | dnf clean all -y 53 | 54 | # Copy extra files to the image. 55 | COPY ./core/root/ / 56 | 57 | # Create a platform-python symlink if it does not exist already 58 | RUN [ -e /usr/libexec/platform-python ] || ln -s /usr/bin/python3 /usr/libexec/platform-python 59 | 60 | # Directory with the sources is set as the working directory so all STI scripts 61 | # can execute relative to this path. 62 | WORKDIR ${HOME} 63 | 64 | ENTRYPOINT ["container-entrypoint"] 65 | CMD ["base-usage"] 66 | 67 | # Reset permissions of modified directories and add default user 68 | RUN rpm-file-permissions && \ 69 | useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \ 70 | chown -R 1001:0 ${APP_ROOT} 71 | -------------------------------------------------------------------------------- /core/Dockerfile.f39: -------------------------------------------------------------------------------- 1 | # This image is the base image for all s2i configurable container images. 2 | FROM quay.io/fedora/fedora:39 3 | 4 | ENV SUMMARY="Base image which allows using of source-to-image." \ 5 | DESCRIPTION="The s2i-core image provides any images layered on top of it \ 6 | with all the tools needed to use source-to-image functionality while keeping \ 7 | the image size as small as possible." \ 8 | NAME=s2i-core \ 9 | VERSION=39 \ 10 | ARCH=x86_64 11 | 12 | LABEL summary="$SUMMARY" \ 13 | description="$DESCRIPTION" \ 14 | io.k8s.description="$DESCRIPTION" \ 15 | io.k8s.display-name="s2i core" \ 16 | io.openshift.s2i.scripts-url=image:///usr/libexec/s2i \ 17 | io.s2i.scripts-url=image:///usr/libexec/s2i \ 18 | com.redhat.component="$NAME" \ 19 | name="fedora/$NAME" \ 20 | version="$VERSION" \ 21 | usage="This image is supposed to be used as a base image for other images that support source-to-image" \ 22 | maintainer="SoftwareCollections.org " 23 | 24 | ENV \ 25 | # DEPRECATED: Use above LABEL instead, because this will be removed in future versions. 26 | STI_SCRIPTS_URL=image:///usr/libexec/s2i \ 27 | # Path to be used in other layers to place s2i scripts into 28 | STI_SCRIPTS_PATH=/usr/libexec/s2i \ 29 | APP_ROOT=/opt/app-root \ 30 | # The $HOME is not set by default, but some applications needs this variable 31 | HOME=/opt/app-root/src \ 32 | PATH=/opt/app-root/src/bin:/opt/app-root/bin:$PATH \ 33 | PLATFORM="fedora" 34 | 35 | # This is the list of basic dependencies that all language container image can 36 | # consume. 37 | # Also setup the 'openshift' user that is used for the build execution and for the 38 | # application runtime execution. 39 | # TODO: Use better UID and GID values 40 | RUN INSTALL_PKGS="bsdtar \ 41 | findutils \ 42 | gettext \ 43 | glibc-langpack-en \ 44 | groff-base \ 45 | rsync \ 46 | tar \ 47 | unzip" && \ 48 | mkdir -p ${HOME}/.pki/nssdb && \ 49 | chown -R 1001:0 ${HOME}/.pki && \ 50 | dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 51 | rpm -V $INSTALL_PKGS && \ 52 | dnf clean all -y 53 | 54 | # Copy extra files to the image. 55 | COPY ./core/root/ / 56 | 57 | # Create a platform-python symlink if it does not exist already 58 | RUN [ -e /usr/libexec/platform-python ] || ln -s /usr/bin/python3 /usr/libexec/platform-python 59 | 60 | # Directory with the sources is set as the working directory so all STI scripts 61 | # can execute relative to this path. 62 | WORKDIR ${HOME} 63 | 64 | ENTRYPOINT ["container-entrypoint"] 65 | CMD ["base-usage"] 66 | 67 | # Reset permissions of modified directories and add default user 68 | RUN rpm-file-permissions && \ 69 | useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \ 70 | chown -R 1001:0 ${APP_ROOT} 71 | -------------------------------------------------------------------------------- /core/Dockerfile.f40: -------------------------------------------------------------------------------- 1 | # This image is the base image for all s2i configurable container images. 2 | FROM quay.io/fedora/fedora:40 3 | 4 | ENV SUMMARY="Base image which allows using of source-to-image." \ 5 | DESCRIPTION="The s2i-core image provides any images layered on top of it \ 6 | with all the tools needed to use source-to-image functionality while keeping \ 7 | the image size as small as possible." \ 8 | NAME=s2i-core \ 9 | VERSION=40 \ 10 | ARCH=x86_64 11 | 12 | LABEL summary="$SUMMARY" \ 13 | description="$DESCRIPTION" \ 14 | io.k8s.description="$DESCRIPTION" \ 15 | io.k8s.display-name="s2i core" \ 16 | io.openshift.s2i.scripts-url=image:///usr/libexec/s2i \ 17 | io.s2i.scripts-url=image:///usr/libexec/s2i \ 18 | com.redhat.component="$NAME" \ 19 | name="fedora/$NAME" \ 20 | version="$VERSION" \ 21 | usage="This image is supposed to be used as a base image for other images that support source-to-image" \ 22 | maintainer="SoftwareCollections.org " 23 | 24 | ENV \ 25 | # DEPRECATED: Use above LABEL instead, because this will be removed in future versions. 26 | STI_SCRIPTS_URL=image:///usr/libexec/s2i \ 27 | # Path to be used in other layers to place s2i scripts into 28 | STI_SCRIPTS_PATH=/usr/libexec/s2i \ 29 | APP_ROOT=/opt/app-root \ 30 | # The $HOME is not set by default, but some applications needs this variable 31 | HOME=/opt/app-root/src \ 32 | PATH=/opt/app-root/src/bin:/opt/app-root/bin:$PATH \ 33 | PLATFORM="fedora" 34 | 35 | # This is the list of basic dependencies that all language container image can 36 | # consume. 37 | # Also setup the 'openshift' user that is used for the build execution and for the 38 | # application runtime execution. 39 | # TODO: Use better UID and GID values 40 | RUN INSTALL_PKGS="bsdtar \ 41 | findutils \ 42 | gettext \ 43 | glibc-langpack-en \ 44 | groff-base \ 45 | rsync \ 46 | tar \ 47 | unzip" && \ 48 | mkdir -p ${HOME}/.pki/nssdb && \ 49 | chown -R 1001:0 ${HOME}/.pki && \ 50 | dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 51 | rpm -V $INSTALL_PKGS && \ 52 | dnf clean all -y 53 | 54 | # Copy extra files to the image. 55 | COPY ./core/root/ / 56 | 57 | # Create a platform-python symlink if it does not exist already 58 | RUN [ -e /usr/libexec/platform-python ] || ln -s /usr/bin/python3 /usr/libexec/platform-python 59 | 60 | # Directory with the sources is set as the working directory so all STI scripts 61 | # can execute relative to this path. 62 | WORKDIR ${HOME} 63 | 64 | ENTRYPOINT ["container-entrypoint"] 65 | CMD ["base-usage"] 66 | 67 | # Reset permissions of modified directories and add default user 68 | RUN rpm-file-permissions && \ 69 | useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \ 70 | chown -R 1001:0 ${APP_ROOT} 71 | -------------------------------------------------------------------------------- /core/Dockerfile.f41: -------------------------------------------------------------------------------- 1 | # This image is the base image for all s2i configurable container images. 2 | FROM quay.io/fedora/fedora:41 3 | 4 | ENV SUMMARY="Base image which allows using of source-to-image." \ 5 | DESCRIPTION="The s2i-core image provides any images layered on top of it \ 6 | with all the tools needed to use source-to-image functionality while keeping \ 7 | the image size as small as possible." \ 8 | NAME=s2i-core \ 9 | VERSION=41 \ 10 | ARCH=x86_64 11 | 12 | LABEL summary="$SUMMARY" \ 13 | description="$DESCRIPTION" \ 14 | io.k8s.description="$DESCRIPTION" \ 15 | io.k8s.display-name="s2i core" \ 16 | io.openshift.s2i.scripts-url=image:///usr/libexec/s2i \ 17 | io.s2i.scripts-url=image:///usr/libexec/s2i \ 18 | com.redhat.component="$NAME" \ 19 | name="fedora/$NAME" \ 20 | version="$VERSION" \ 21 | usage="This image is supposed to be used as a base image for other images that support source-to-image" \ 22 | maintainer="SoftwareCollections.org " 23 | 24 | ENV \ 25 | # DEPRECATED: Use above LABEL instead, because this will be removed in future versions. 26 | STI_SCRIPTS_URL=image:///usr/libexec/s2i \ 27 | # Path to be used in other layers to place s2i scripts into 28 | STI_SCRIPTS_PATH=/usr/libexec/s2i \ 29 | APP_ROOT=/opt/app-root \ 30 | # The $HOME is not set by default, but some applications needs this variable 31 | HOME=/opt/app-root/src \ 32 | PATH=/opt/app-root/src/bin:/opt/app-root/bin:$PATH \ 33 | PLATFORM="fedora" 34 | 35 | # This is the list of basic dependencies that all language container image can 36 | # consume. 37 | # Also setup the 'openshift' user that is used for the build execution and for the 38 | # application runtime execution. 39 | # TODO: Use better UID and GID values 40 | RUN INSTALL_PKGS="bsdtar \ 41 | findutils \ 42 | gettext \ 43 | glibc-langpack-en \ 44 | groff-base \ 45 | python3 \ 46 | rsync \ 47 | tar \ 48 | unzip" && \ 49 | mkdir -p ${HOME}/.pki/nssdb && \ 50 | chown -R 1001:0 ${HOME}/.pki && \ 51 | dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 52 | rpm -V $INSTALL_PKGS && \ 53 | dnf clean all -y 54 | 55 | # Copy extra files to the image. 56 | COPY ./core/root/ / 57 | 58 | # Create a platform-python symlink if it does not exist already 59 | RUN [ -e /usr/libexec/platform-python ] || ln -s /usr/bin/python3 /usr/libexec/platform-python 60 | 61 | # Directory with the sources is set as the working directory so all STI scripts 62 | # can execute relative to this path. 63 | WORKDIR ${HOME} 64 | 65 | ENTRYPOINT ["container-entrypoint"] 66 | CMD ["base-usage"] 67 | 68 | # Reset permissions of modified directories and add default user 69 | RUN rpm-file-permissions && \ 70 | useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \ 71 | chown -R 1001:0 ${APP_ROOT} 72 | -------------------------------------------------------------------------------- /core/Dockerfile.f42: -------------------------------------------------------------------------------- 1 | # This image is the base image for all s2i configurable container images. 2 | FROM quay.io/fedora/fedora:42 3 | 4 | ENV SUMMARY="Base image which allows using of source-to-image." \ 5 | DESCRIPTION="The s2i-core image provides any images layered on top of it \ 6 | with all the tools needed to use source-to-image functionality while keeping \ 7 | the image size as small as possible." \ 8 | NAME=s2i-core \ 9 | VERSION=42 \ 10 | ARCH=x86_64 11 | 12 | LABEL summary="$SUMMARY" \ 13 | description="$DESCRIPTION" \ 14 | io.k8s.description="$DESCRIPTION" \ 15 | io.k8s.display-name="s2i core" \ 16 | io.openshift.s2i.scripts-url=image:///usr/libexec/s2i \ 17 | io.s2i.scripts-url=image:///usr/libexec/s2i \ 18 | com.redhat.component="$NAME" \ 19 | name="fedora/$NAME" \ 20 | version="$VERSION" \ 21 | usage="This image is supposed to be used as a base image for other images that support source-to-image" \ 22 | maintainer="SoftwareCollections.org " 23 | 24 | ENV \ 25 | # DEPRECATED: Use above LABEL instead, because this will be removed in future versions. 26 | STI_SCRIPTS_URL=image:///usr/libexec/s2i \ 27 | # Path to be used in other layers to place s2i scripts into 28 | STI_SCRIPTS_PATH=/usr/libexec/s2i \ 29 | APP_ROOT=/opt/app-root \ 30 | # The $HOME is not set by default, but some applications needs this variable 31 | HOME=/opt/app-root/src \ 32 | PATH=/opt/app-root/src/bin:/opt/app-root/bin:$PATH \ 33 | PLATFORM="fedora" 34 | 35 | # This is the list of basic dependencies that all language container image can 36 | # consume. 37 | # Also setup the 'openshift' user that is used for the build execution and for the 38 | # application runtime execution. 39 | # TODO: Use better UID and GID values 40 | RUN INSTALL_PKGS="bsdtar \ 41 | findutils \ 42 | gettext \ 43 | glibc-langpack-en \ 44 | groff-base \ 45 | python3 \ 46 | rsync \ 47 | tar \ 48 | unzip" && \ 49 | mkdir -p ${HOME}/.pki/nssdb && \ 50 | chown -R 1001:0 ${HOME}/.pki && \ 51 | dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 52 | rpm -V $INSTALL_PKGS && \ 53 | dnf clean all -y 54 | 55 | # Copy extra files to the image. 56 | COPY ./core/root/ / 57 | 58 | # Create a platform-python symlink if it does not exist already 59 | RUN [ -e /usr/libexec/platform-python ] || ln -s /usr/bin/python3 /usr/libexec/platform-python 60 | 61 | # Directory with the sources is set as the working directory so all STI scripts 62 | # can execute relative to this path. 63 | WORKDIR ${HOME} 64 | 65 | ENTRYPOINT ["container-entrypoint"] 66 | CMD ["base-usage"] 67 | 68 | # Reset permissions of modified directories and add default user 69 | RUN rpm-file-permissions && \ 70 | useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \ 71 | chown -R 1001:0 ${APP_ROOT} 72 | -------------------------------------------------------------------------------- /core/Dockerfile.fedora: -------------------------------------------------------------------------------- 1 | Dockerfile.f42 -------------------------------------------------------------------------------- /core/Dockerfile.rhel10: -------------------------------------------------------------------------------- 1 | # This image is the base image for all s2i configurable container images. 2 | FROM ubi10:latest 3 | 4 | ENV SUMMARY="Base image which allows using of source-to-image." \ 5 | DESCRIPTION="The s2i-core image provides any images layered on top of it \ 6 | with all the tools needed to use source-to-image functionality while keeping \ 7 | the image size as small as possible." \ 8 | NAME=s2i-core \ 9 | VERSION=10 10 | 11 | LABEL summary="$SUMMARY" \ 12 | description="$DESCRIPTION" \ 13 | io.k8s.description="$DESCRIPTION" \ 14 | io.k8s.display-name="s2i core" \ 15 | io.openshift.s2i.scripts-url=image:///usr/libexec/s2i \ 16 | io.s2i.scripts-url=image:///usr/libexec/s2i \ 17 | io.openshift.tags="s2i-core rhel10" \ 18 | com.redhat.component="s2i-core-container" \ 19 | name="ubi10/s2i-core" \ 20 | version="1" \ 21 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" 22 | 23 | ENV \ 24 | # DEPRECATED: Use above LABEL instead, because this will be removed in future versions. 25 | STI_SCRIPTS_URL=image:///usr/libexec/s2i \ 26 | # Path to be used in other layers to place s2i scripts into 27 | STI_SCRIPTS_PATH=/usr/libexec/s2i \ 28 | APP_ROOT=/opt/app-root \ 29 | # The $HOME is not set by default, but some applications needs this variable 30 | HOME=/opt/app-root/src \ 31 | PATH=/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ 32 | PLATFORM="el10" 33 | 34 | # This is the list of basic dependencies that all language container image can 35 | # consume. 36 | # Also setup the 'openshift' user that is used for the build execution and for the 37 | # application runtime execution. 38 | # TODO: Use better UID and GID values 39 | 40 | RUN INSTALL_PKGS="bsdtar \ 41 | findutils \ 42 | gettext \ 43 | glibc-langpack-en \ 44 | groff-base \ 45 | rsync \ 46 | tar \ 47 | unzip \ 48 | yum" && \ 49 | mkdir -p ${HOME}/.pki/nssdb && \ 50 | chown -R 1001:0 ${HOME}/.pki && \ 51 | dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 52 | rpm -V $INSTALL_PKGS && \ 53 | dnf -y clean all --enablerepo='*' 54 | 55 | # Copy extra files to the image. 56 | COPY ./core/root/ / 57 | 58 | # Directory with the sources is set as the working directory so all STI scripts 59 | # can execute relative to this path. 60 | WORKDIR ${HOME} 61 | 62 | ENTRYPOINT ["container-entrypoint"] 63 | CMD ["base-usage"] 64 | 65 | # Reset permissions of modified directories and add default user 66 | RUN rpm-file-permissions && \ 67 | useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \ 68 | chown -R 1001:0 ${APP_ROOT} 69 | -------------------------------------------------------------------------------- /core/Dockerfile.rhel7: -------------------------------------------------------------------------------- 1 | # This image is the base image for all s2i configurable container images. 2 | FROM registry.access.redhat.com/ubi7:latest 3 | 4 | ENV SUMMARY="Base image which allows using of source-to-image." \ 5 | DESCRIPTION="The s2i-core image provides any images layered on top of it \ 6 | with all the tools needed to use source-to-image functionality while keeping \ 7 | the image size as small as possible." 8 | 9 | LABEL summary="$SUMMARY" \ 10 | description="$DESCRIPTION" \ 11 | io.k8s.description="$DESCRIPTION" \ 12 | io.k8s.display-name="s2i core" \ 13 | io.openshift.s2i.scripts-url=image:///usr/libexec/s2i \ 14 | io.s2i.scripts-url=image:///usr/libexec/s2i \ 15 | com.redhat.component="s2i-core-container" \ 16 | name="rhscl/s2i-core-rhel7" \ 17 | version="1" \ 18 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" 19 | 20 | ENV \ 21 | # DEPRECATED: Use above LABEL instead, because this will be removed in future versions. 22 | STI_SCRIPTS_URL=image:///usr/libexec/s2i \ 23 | # Path to be used in other layers to place s2i scripts into 24 | STI_SCRIPTS_PATH=/usr/libexec/s2i \ 25 | APP_ROOT=/opt/app-root \ 26 | # The $HOME is not set by default, but some applications needs this variable 27 | # TODO: There is a bug in rhel7.1 image where the PATH variable is not exported 28 | # properly as container image metadata, which causes the $PATH variable do not 29 | # expand properly. 30 | HOME=/opt/app-root/src \ 31 | PATH=/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ 32 | PLATFORM="el7" 33 | 34 | # When bash is started non-interactively, to run a shell script, for example it 35 | # looks for this variable and source the content of this file. This will enable 36 | # the SCL for all scripts without need to do 'scl enable'. 37 | ENV BASH_ENV=${APP_ROOT}/etc/scl_enable \ 38 | ENV=${APP_ROOT}/etc/scl_enable \ 39 | PROMPT_COMMAND=". ${APP_ROOT}/etc/scl_enable" 40 | 41 | # Copy just prepare-yum-repositories that is needed for packages install step, 42 | # other files might be added later so changing them does not cause packages 43 | # to be installed again, which takes long time 44 | COPY ./core/root/usr/bin/prepare-yum-repositories /usr/bin/prepare-yum-repositories 45 | 46 | # This is the list of basic dependencies that all language container image can 47 | # consume. 48 | # Also setup the 'openshift' user that is used for the build execution and for the 49 | # application runtime execution. 50 | # TODO: Use better UID and GID values 51 | RUN prepare-yum-repositories && \ 52 | INSTALL_PKGS="bsdtar \ 53 | findutils \ 54 | gettext \ 55 | groff-base \ 56 | rsync \ 57 | scl-utils \ 58 | tar \ 59 | unzip \ 60 | yum-utils" && \ 61 | mkdir -p ${HOME}/.pki/nssdb && \ 62 | chown -R 1001:0 ${HOME}/.pki && \ 63 | yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 64 | rpm -V $INSTALL_PKGS && \ 65 | yum -y clean all --enablerepo='*' 66 | 67 | # Copy extra files to the image. 68 | COPY ./core/root/ / 69 | 70 | # Directory with the sources is set as the working directory so all STI scripts 71 | # can execute relative to this path. 72 | WORKDIR ${HOME} 73 | 74 | ENTRYPOINT ["container-entrypoint"] 75 | CMD ["base-usage"] 76 | 77 | # Reset permissions of modified directories and add default user 78 | RUN rpm-file-permissions && \ 79 | useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \ 80 | chown -R 1001:0 ${APP_ROOT} 81 | -------------------------------------------------------------------------------- /core/Dockerfile.rhel8: -------------------------------------------------------------------------------- 1 | # This image is the base image for all s2i configurable container images. 2 | FROM registry.access.redhat.com/ubi8:latest 3 | 4 | ENV SUMMARY="Base image which allows using of source-to-image." \ 5 | DESCRIPTION="The s2i-core image provides any images layered on top of it \ 6 | with all the tools needed to use source-to-image functionality while keeping \ 7 | the image size as small as possible." 8 | 9 | LABEL summary="$SUMMARY" \ 10 | description="$DESCRIPTION" \ 11 | io.k8s.description="$DESCRIPTION" \ 12 | io.k8s.display-name="s2i core" \ 13 | io.openshift.s2i.scripts-url=image:///usr/libexec/s2i \ 14 | io.s2i.scripts-url=image:///usr/libexec/s2i \ 15 | com.redhat.component="s2i-core-container" \ 16 | name="ubi8/s2i-core" \ 17 | version="1" \ 18 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" 19 | 20 | ENV \ 21 | # DEPRECATED: Use above LABEL instead, because this will be removed in future versions. 22 | STI_SCRIPTS_URL=image:///usr/libexec/s2i \ 23 | # Path to be used in other layers to place s2i scripts into 24 | STI_SCRIPTS_PATH=/usr/libexec/s2i \ 25 | APP_ROOT=/opt/app-root \ 26 | # The $HOME is not set by default, but some applications needs this variable 27 | HOME=/opt/app-root/src \ 28 | PATH=/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ 29 | PLATFORM="el8" 30 | 31 | # This is the list of basic dependencies that all language container image can 32 | # consume. 33 | # Also setup the 'openshift' user that is used for the build execution and for the 34 | # application runtime execution. 35 | # TODO: Use better UID and GID values 36 | 37 | RUN INSTALL_PKGS="bsdtar \ 38 | findutils \ 39 | groff-base \ 40 | glibc-locale-source \ 41 | glibc-langpack-en \ 42 | gettext \ 43 | rsync \ 44 | scl-utils \ 45 | tar \ 46 | unzip \ 47 | xz \ 48 | yum" && \ 49 | mkdir -p ${HOME}/.pki/nssdb && \ 50 | chown -R 1001:0 ${HOME}/.pki && \ 51 | yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 52 | rpm -V $INSTALL_PKGS && \ 53 | yum -y clean all --enablerepo='*' 54 | 55 | # Copy extra files to the image. 56 | COPY ./core/root/ / 57 | 58 | # Directory with the sources is set as the working directory so all STI scripts 59 | # can execute relative to this path. 60 | WORKDIR ${HOME} 61 | 62 | ENTRYPOINT ["container-entrypoint"] 63 | CMD ["base-usage"] 64 | 65 | # Reset permissions of modified directories and add default user 66 | RUN rpm-file-permissions && \ 67 | useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \ 68 | chown -R 1001:0 ${APP_ROOT} 69 | -------------------------------------------------------------------------------- /core/Dockerfile.rhel9: -------------------------------------------------------------------------------- 1 | # This image is the base image for all s2i configurable container images. 2 | FROM registry.access.redhat.com/ubi9:latest 3 | 4 | ENV SUMMARY="Base image which allows using of source-to-image." \ 5 | DESCRIPTION="The s2i-core image provides any images layered on top of it \ 6 | with all the tools needed to use source-to-image functionality while keeping \ 7 | the image size as small as possible." 8 | 9 | LABEL summary="$SUMMARY" \ 10 | description="$DESCRIPTION" \ 11 | io.k8s.description="$DESCRIPTION" \ 12 | io.k8s.display-name="s2i core" \ 13 | io.openshift.s2i.scripts-url=image:///usr/libexec/s2i \ 14 | io.s2i.scripts-url=image:///usr/libexec/s2i \ 15 | io.openshift.tags="s2i-core rhel9" \ 16 | com.redhat.component="s2i-core-container" \ 17 | name="ubi9/s2i-core" \ 18 | version="1" \ 19 | com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" 20 | 21 | ENV \ 22 | # DEPRECATED: Use above LABEL instead, because this will be removed in future versions. 23 | STI_SCRIPTS_URL=image:///usr/libexec/s2i \ 24 | # Path to be used in other layers to place s2i scripts into 25 | STI_SCRIPTS_PATH=/usr/libexec/s2i \ 26 | APP_ROOT=/opt/app-root \ 27 | # The $HOME is not set by default, but some applications needs this variable 28 | HOME=/opt/app-root/src \ 29 | PATH=/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ 30 | PLATFORM="el9" 31 | 32 | # This is the list of basic dependencies that all language container image can 33 | # consume. 34 | # Also setup the 'openshift' user that is used for the build execution and for the 35 | # application runtime execution. 36 | # TODO: Use better UID and GID values 37 | 38 | RUN INSTALL_PKGS="bsdtar \ 39 | findutils \ 40 | groff-base \ 41 | glibc-locale-source \ 42 | glibc-langpack-en \ 43 | gettext \ 44 | rsync \ 45 | scl-utils \ 46 | tar \ 47 | unzip \ 48 | xz \ 49 | yum" && \ 50 | mkdir -p ${HOME}/.pki/nssdb && \ 51 | chown -R 1001:0 ${HOME}/.pki && \ 52 | yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ 53 | rpm -V $INSTALL_PKGS && \ 54 | yum -y clean all --enablerepo='*' 55 | 56 | # Copy extra files to the image. 57 | COPY ./core/root/ / 58 | 59 | # Directory with the sources is set as the working directory so all STI scripts 60 | # can execute relative to this path. 61 | WORKDIR ${HOME} 62 | 63 | ENTRYPOINT ["container-entrypoint"] 64 | CMD ["base-usage"] 65 | 66 | # Reset permissions of modified directories and add default user 67 | RUN rpm-file-permissions && \ 68 | useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \ 69 | chown -R 1001:0 ${APP_ROOT} 70 | -------------------------------------------------------------------------------- /core/README.md: -------------------------------------------------------------------------------- 1 | OpenShift base images (core variant) 2 | ======================================== 3 | 4 | This repository contains Dockerfiles for images which can be used as base images 5 | to add support for [source-to-image](https://github.com/openshift/source-to-image) 6 | without installing several development libraries. 7 | 8 | 9 | Description 10 | -------------------------------- 11 | OpenShift S2I images use [Software Collections](https://www.softwarecollections.org/en/) 12 | packages to provide the latest versions of various software. 13 | The SCL packages are released more frequently than the RHEL or CentOS systems, 14 | which are unlikely to change for several years. 15 | We rely on RHEL and CentOS for base images, on the other hand, 16 | because those are stable, supported, and secure platforms. 17 | 18 | Normally, SCL requires manual operation to enable the collection you want to use. 19 | This is burdensome and can be prone to error. 20 | The OpenShift S2I approach is to set Bash environment variables that 21 | serve to automatically enable the desired collection: 22 | 23 | * `BASH_ENV`: enables the collection for all non-interactive Bash sessions 24 | * `ENV`: enables the collection for all invocations of `/bin/sh` 25 | * `PROMPT_COMMAND`: enables the collection in interactive shell 26 | 27 | Two examples: 28 | * If you specify `BASH_ENV`, then all your `#!/bin/bash` scripts 29 | do not need to call `scl enable`. 30 | * If you specify `PROMPT_COMMAND`, then on execution of the 31 | `podman exec ... /bin/bash` command, the collection will be automatically enabled. 32 | 33 | *Note*: 34 | Executables in Software Collections packages (e.g., `ruby`) 35 | are not directly in a directory named in the `PATH` environment variable. 36 | This means that you cannot do: 37 | 38 | $ podman exec ... ruby 39 | 40 | but must instead do: 41 | 42 | $ podman exec ... /bin/bash -c ruby 43 | 44 | The `/bin/bash -c`, along with the setting the appropriate environment variable, 45 | ensures the correct `ruby` executable is found and invoked. 46 | 47 | Note: while the examples in this README are calling `podman`, you can replace any such calls by `docker` with the same arguments 48 | 49 | Usage 50 | ------------------------ 51 | Choose either the CentOS Stream or RHEL8 base image: 52 | * **RHEL8 base image** 53 | 54 | To build a RHEL8 based image, you need to build it on properly subscribed RHEL machine. 55 | 56 | ``` 57 | $ git clone --recursive https://github.com/sclorg/s2i-base-container.git 58 | $ cd s2i-base-container 59 | $ make build VERSIONS=core TARGET=rhel8 60 | ``` 61 | 62 | * **CentOS Stream base image** 63 | 64 | This image is available on Quay.io. To download it run: 65 | 66 | ```console 67 | podman pull quay.io/sclorg/s2i-core-c9s 68 | ``` 69 | 70 | To build a Base image from scratch run: 71 | 72 | ``` 73 | $ git clone --recursive https://github.com/sclorg/s2i-base-container.git 74 | $ cd s2i-base-container 75 | $ make build VERSIONS=core TARGET=c9s 76 | ``` 77 | 78 | **Notice: By omitting the `VERSION` parameter, the build/test action will be performed 79 | on all provided versions of s2i image.** 80 | 81 | 82 | See also 83 | -------- 84 | Dockerfile and other sources are available on https://github.com/sclorg/s2i-base-container. 85 | In that repository you also can find another variants of S2I Base Dockerfiles. 86 | The Dockerfile for RHEL8 is called Dockerfile.rhel8, the Dockerfile for RHEL9 is called Dockerfile.rhel9, 87 | the Dockerfile for RHEL10 is called Dockerfile.rhel10, 88 | the Dockerfile for CentOS Stream 9 is called Dockerfile.c9s, the Dockerfile for CentOS Stream 10 is called Dockerfile.c10s, 89 | and the Dockerfile for Fedora is Dockerfile.fedora. 90 | -------------------------------------------------------------------------------- /core/root: -------------------------------------------------------------------------------- 1 | ../common/shared-scripts/core -------------------------------------------------------------------------------- /core/test/run: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # The 'run' performs a simple test that verifies that S2I image. 4 | # The main focus is that the image prints out the base-usage properly. 5 | # 6 | # IMAGE_NAME specifies a name of the candidate image used for testing. 7 | # The image has to be available before this script is executed. 8 | # 9 | test -n "${IMAGE_NAME-}" || { echo 'make sure $IMAGE_NAME is defined'; exit 1; } 10 | 11 | test_docker_run_usage() { 12 | echo "Testing 'docker run' usage..." 13 | docker run --rm ${IMAGE_NAME} &>/dev/null 14 | } 15 | 16 | test_cgroup_limits() { 17 | echo "Testing 'cgroup limits' usage..." 18 | if [ $EUID -eq 0 ]; then 19 | echo " The test is running as root, all tests for cgroup limits will be run" 20 | 21 | # check memory limited (only works when running as root) 22 | echo " Testing 'limited memory' usage..." 23 | if ! ( eval $(docker run --rm --memory=512M ${IMAGE_NAME} /usr/bin/cgroup-limits) 24 | echo "MEMORY_LIMIT_IN_BYTES=$MEMORY_LIMIT_IN_BYTES" 25 | [ "$MEMORY_LIMIT_IN_BYTES" -eq 536870912 ] ); then 26 | echo "MEMORY_LIMIT_IN_BYTES not set to 536870912." 27 | return 1 28 | fi 29 | 30 | # check cores number (only works when running as root) 31 | echo " Testing 'NUMBER_OF_CORES' value..." 32 | if ! ( eval $(docker run --rm ${IMAGE_NAME} /usr/bin/cgroup-limits) 33 | echo "NUMBER_OF_CORES=$NUMBER_OF_CORES" 34 | [ "$NUMBER_OF_CORES" -gt 0 ] ); then 35 | echo "NUMBER_OF_CORES not set." 36 | return 1 37 | fi 38 | 39 | # check cores number (only works when running as root) 40 | echo " Testing 'NUMBER_OF_CORES' value with --cpuset-cpus=0..." 41 | if ! ( eval $(docker run --rm --cpuset-cpus=0 ${IMAGE_NAME} /usr/bin/cgroup-limits) 42 | echo "NUMBER_OF_CORES=$NUMBER_OF_CORES" 43 | [ "$NUMBER_OF_CORES" -eq 1 ] ); then 44 | echo "NUMBER_OF_CORES not set to 1 when set --cpuset-cpus=0." 45 | return 1 46 | fi 47 | 48 | else 49 | echo " The test is running as non-root, some tests for cgroup limits are skipped" 50 | fi 51 | 52 | # check NO_MEMORY_LIMIT when no limit is set 53 | echo " Testing 'NO_MEMORY_LIMIT' value..." 54 | if ! ( eval $(docker run --rm ${IMAGE_NAME} /usr/bin/cgroup-limits) 55 | echo "NO_MEMORY_LIMIT=$NO_MEMORY_LIMIT" 56 | [ "$NO_MEMORY_LIMIT" == 'true' ] ); then 57 | echo "NO_MEMORY_LIMIT not set to true." 58 | return 1 59 | fi 60 | 61 | # check default memory in bytes 62 | echo " Testing 'MEMORY_LIMIT_IN_BYTES' value..." 63 | if ! ( eval $(docker run --rm ${IMAGE_NAME} /usr/bin/cgroup-limits) 64 | echo "MEMORY_LIMIT_IN_BYTES=$MEMORY_LIMIT_IN_BYTES" 65 | # This value can be different, but it must be very big (comparing to 10TB) 66 | [ "$MEMORY_LIMIT_IN_BYTES" -gt 10000000000000 ] ); then 67 | echo "MEMORY_LIMIT_IN_BYTES not greater than 10000000000000." 68 | return 1 69 | fi 70 | } 71 | 72 | check_result() { 73 | local result="$1" 74 | if [[ "$result" != "0" ]]; then 75 | echo "S2I image '${IMAGE_NAME}' test FAILED (exit code: ${result})" 76 | exit $result 77 | fi 78 | } 79 | 80 | # Verify the 'usage' script is working properly when running the base image with 'docker run ...' 81 | test_docker_run_usage 82 | check_result $? 83 | 84 | # Verify the cgroup-limits script works as expected 85 | test_cgroup_limits 86 | check_result $? 87 | 88 | echo "Tests for '${IMAGE_NAME}' succeeded." 89 | 90 | # vim: set tabstop=2:shiftwidth=2:expandtab: 91 | --------------------------------------------------------------------------------