{"id":18290220,"url":"https://github.com/msyrus/cuba-s2i-builder","last_synced_at":"2026-04-28T11:01:55.525Z","repository":{"id":81127537,"uuid":"204514223","full_name":"msyrus/cuba-s2i-builder","owner":"msyrus","description":"Openshift s2i builder for CUBA applications","archived":false,"fork":false,"pushed_at":"2019-08-27T17:11:27.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T07:26:22.299Z","etag":null,"topics":["builder","cuba-platform","gradle","openjdk8","openshift","s2i","uberjar"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msyrus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-26T16:15:58.000Z","updated_at":"2019-08-27T17:11:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"d0197fe9-d62e-466a-ba86-f4dacfb173dd","html_url":"https://github.com/msyrus/cuba-s2i-builder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/msyrus/cuba-s2i-builder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msyrus%2Fcuba-s2i-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msyrus%2Fcuba-s2i-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msyrus%2Fcuba-s2i-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msyrus%2Fcuba-s2i-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msyrus","download_url":"https://codeload.github.com/msyrus/cuba-s2i-builder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msyrus%2Fcuba-s2i-builder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32377599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T09:24:15.638Z","status":"ssl_error","status_checked_at":"2026-04-28T09:24:15.071Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["builder","cuba-platform","gradle","openjdk8","openshift","s2i","uberjar"],"created_at":"2024-11-05T14:09:54.355Z","updated_at":"2026-04-28T11:01:55.508Z","avatar_url":"https://github.com/msyrus.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Creating a basic S2I builder image  \n\n## Getting started  \n\n### Files and Directories  \n| File                   | Required? | Description                                                  |\n|------------------------|-----------|--------------------------------------------------------------|\n| Dockerfile             | Yes       | Defines the base builder image                               |\n| s2i/bin/assemble       | Yes       | Script that builds the application                           |\n| s2i/bin/usage          | No        | Script that prints the usage of the builder                  |\n| s2i/bin/run            | Yes       | Script that runs the application                             |\n| s2i/bin/save-artifacts | No        | Script for incremental builds that saves the built artifacts |\n| test/run               | No        | Test script for the builder image                            |\n| test/test-app          | Yes       | Test application source code                                 |\n\n#### Dockerfile\nCreate a *Dockerfile* that installs all of the necessary tools and libraries that are needed to build and run our application.  This file will also handle copying the s2i scripts into the created image.\n\n#### S2I scripts\n\n##### assemble\nCreate an *assemble* script that will build our application, e.g.:\n- build python modules\n- bundle install ruby gems\n- setup application specific configuration\n\nThe script can also specify a way to restore any saved artifacts from the previous image.   \n\n##### run\nCreate a *run* script that will start the application. \n\n##### save-artifacts (optional)\nCreate a *save-artifacts* script which allows a new build to reuse content from a previous version of the application image.\n\n##### usage (optional) \nCreate a *usage* script that will print out instructions on how to use the image.\n\n##### Make the scripts executable \nMake sure that all of the scripts are executable by running *chmod +x s2i/bin/**\n\n#### Create the builder image\nThe following command will create a builder image named s2i-cuba based on the Dockerfile that was created previously.\n```\ndocker build -t s2i-cuba .\n```\nThe builder image can also be created by using the *make* command since a *Makefile* is included.\n\nOnce the image has finished building, the command *s2i usage s2i-cuba* will print out the help info that was defined in the *usage* script.\n\n#### Testing the builder image\nThe builder image can be tested using the following commands:\n```\ndocker build -t s2i-cuba-candidate .\nIMAGE_NAME=s2i-cuba-candidate test/run\n```\nThe builder image can also be tested by using the *make test* command since a *Makefile* is included.\n\n#### Creating the application image\nThe application image combines the builder image with your applications source code, which is served using whatever application is installed via the *Dockerfile*, compiled using the *assemble* script, and run using the *run* script.\nThe following command will create the application image:\n```\ns2i build test/test-app s2i-cuba s2i-cuba-app\n---\u003e Building and installing application from source...\n```\nUsing the logic defined in the *assemble* script, s2i will now create an application image using the builder image as a base and including the source code from the test/test-app directory. \n\n#### Running the application image\nRunning the application image is as simple as invoking the docker run command:\n```\ndocker run -d -p 8080:8080 s2i-cuba-app\n```\nThe application, which consists of a simple static web page, should now be accessible at  [http://localhost:8080](http://localhost:8080).\n\n#### Using the saved artifacts script\nRebuilding the application using the saved artifacts can be accomplished using the following command:\n```\ns2i build --incremental=true test/test-app nginx-centos7 nginx-app\n---\u003e Restoring build artifacts...\n---\u003e Building and installing application from source...\n```\nThis will run the *save-artifacts* script which includes the custom code to backup the currently running application source, rebuild the application image, and then re-deploy the previously saved source using the *assemble* script.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsyrus%2Fcuba-s2i-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsyrus%2Fcuba-s2i-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsyrus%2Fcuba-s2i-builder/lists"}