{"id":22675547,"url":"https://github.com/chamilad/stratos-dockerfiles","last_synced_at":"2026-01-12T14:02:49.965Z","repository":{"id":21684577,"uuid":"25005822","full_name":"chamilad/stratos-dockerfiles","owner":"chamilad","description":"Docker image build setup for Apache Stratos with modularized Dockerfiles","archived":false,"fork":false,"pushed_at":"2014-12-21T16:45:34.000Z","size":961,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-24T04:34:37.884Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chamilad.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}},"created_at":"2014-10-09T19:48:14.000Z","updated_at":"2024-04-24T04:34:37.885Z","dependencies_parsed_at":"2022-08-17T23:15:30.222Z","dependency_job_id":null,"html_url":"https://github.com/chamilad/stratos-dockerfiles","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chamilad%2Fstratos-dockerfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chamilad%2Fstratos-dockerfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chamilad%2Fstratos-dockerfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chamilad%2Fstratos-dockerfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chamilad","download_url":"https://codeload.github.com/chamilad/stratos-dockerfiles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228936984,"owners_count":17994695,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-09T17:46:04.693Z","updated_at":"2026-01-12T14:02:49.937Z","avatar_url":"https://github.com/chamilad.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker image build setup for Apache Stratos\n\nThis is a sample setup for the modularized Dockerfile system designed for Apache Stratos Kubernetes + Docker functionality. A base image sets up the cartridge agent and the basic tools (+sshd *for now*) required for a service cartridge. This base image is to be used by service Dockerfiles as the base build.\n\n##Setup\n### Base image\n####apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT.zip\nCreate a folder named `packs` alongside the Dockerfile.\n\nClone [this](https://github.com/chamilad/stratos.git) repository and checkout `master` branch. Build Stratos and copy the cartridge agent artifact in to the `packs` folder.\n\n```bash\ngit clone https://github.com/apache/stratos.git\ncd stratos\nmvn clean install\ncp products/python-cartridge-agent/target/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT.zip \u003cBASE-IMAGE\u003e/packs/\n```\n\n####Agent extensions\nInside the packs folder create a folder named `extensions`.\n\nCopy the extension shell script files that should be executed upon various events in to the `packs/extensions` folder. Note that these can be replaced by custom extension scripts by various service images.\n\n### Service Image - Ex: PHP\nA service image should use the base image as the basis to add upon.\n\n```Dockerfile\nFROM chamilad/stratos-base:0.1\n```\n\nThen the service installation and configuration come. Additionally, customized extensions can be included in the service image, which can replace the agent extensions.\n\n```Dockerfile\n##################\n# Install PHP\n##################\nRUN apt-get install -y apache2 php5 zip unzip stress\nRUN rm /etc/apache2/sites-enabled/000-default.conf\nADD files/000-default.conf /etc/apache2/sites-enabled/000-default.conf\n\nEXPOSE 80\n\n#####################\n# Add extensions\n#####################\nADD packs/extensions /mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/extensions\nRUN chmod +x /mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/extensions/*\n```\n\nThe service image should use the run script included in the base image as the `ENTRYPOINT`. This is because it is the script which is responsible for configuring and actually starting the cartridge agent at startup. The complete sample Dockerfile for PHP is as follows.\n\n```Dockerfile\nFROM chamilad/stratos-base:0.1\nMAINTAINER chamilad@wso2.com\n\n##################\n# Install PHP\n##################\nRUN apt-get install -y apache2 php5 zip unzip stress\nRUN rm /etc/apache2/sites-enabled/000-default.conf\nADD files/000-default.conf /etc/apache2/sites-enabled/000-default.conf\n\nEXPOSE 80\n\n#####################\n# Add extensions\n#####################\nADD packs/extensions /mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/extensions\nRUN chmod +x /mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/extensions/*\n\n#####################\n# Entrypoint\n#####################\nENTRYPOINT /usr/local/bin/run | /usr/sbin/sshd -D\n```\n\n##Create the images.\nThe Docker images should be built in the order of base, service. To build an image execute the following command inside the corresponding folder. __Notice the dot at the end of the build command.__ You might need sudo to properly run this.\n\n```bash\ndocker build -t chamilad/stratos-base .\ndocker tag {image hash} chamilad/stratos-base:0.1\n```\n\n## Expected environment variables\n\n### Mandatory\n\n* MB_IP - Message broker Ip address\n* MB_PORT - Message broker port\n\n### Optional\n\n* LISTEN_ADDR - Ip address of the instance, defaults to `localhost`\n* CEP_IP - CEP Ip address, defaults to `MB_IP`\n* CEP_PORT - CEP port, defaults to `7611`\n* CEP_USERNAME - CEP username, defaults to `admin`\n* CEP_PASSWORD - CEP password, defaults to `admin`\n* ENABLE_HEALTH_PUBLISHER - Flag to enable/disable publishing health statistics to a complex event processing server, defaults to `true`\n* LB_PRIVATE_IP - Load balancer's private Ip, defaults to empty\n* LB_PUBLIC_IP - Load balancer's public Ip, defaults to empty\n* ENABLE_ARTFCT_UPDATE - Flag to enable/disable git based artifacts update, defaults to `true`\n* COMMIT_ENABLED - Flag to enable/disable auto commit to git based repository, defaults to `false`\n* CHECKOUT_ENABLED - Flag to enable/disable auto checkout from git based repository, defaults to `true`\n* ARTFCT_UPDATE_INT - The interval in SECONDS to run the artifact update job, defaults to `15`\n* PORT_CHECK_TIMEOUT - The timeout value in MILLISECONDS to wait for ports to be active, defaults to `600000`\n* ENABLE_DATA_PUBLISHER - Flag to enable/disable publishing logs to a monitoring server, defaults to `false`\n* MONITORING_SERVER_IP - Monitoring server Ip address, defaults to `MB_IP`\n* MONITORING_SERVER_PORT - Monitoring server port, defaults to `7611`\n* MONITORING_SERVER_SECURE_PORT - Monitoring server secure port, defaults to `7711`\n* MONITORING_SERVER_ADMIN_USERNAME - Defaults to `admin`\n* MONITORING_SERVER_ADMIN_PASSWORD - Defaults to `admin`\n* LOG_FILE_PATHS - Log files to be included in log publishing to monitoring server, defaults to empty\n* APP_PATH - Application root, default to empty\n* LOG_LEVEL - Log level to use in cartridge agent logging, defaults to `INFO`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchamilad%2Fstratos-dockerfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchamilad%2Fstratos-dockerfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchamilad%2Fstratos-dockerfiles/lists"}