{"id":30623607,"url":"https://github.com/aligent/bitbucket-opensearch-docker","last_synced_at":"2026-06-24T01:31:23.183Z","repository":{"id":310423088,"uuid":"1039771211","full_name":"aligent/bitbucket-opensearch-docker","owner":"aligent","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-18T06:28:30.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-29T21:27:03.995Z","etag":null,"topics":[],"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/aligent.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-18T00:20:14.000Z","updated_at":"2025-08-18T06:28:34.000Z","dependencies_parsed_at":"2025-08-18T02:50:34.082Z","dependency_job_id":"4fc0cf90-17a1-48d4-a4e8-fa47be9348a7","html_url":"https://github.com/aligent/bitbucket-opensearch-docker","commit_stats":null,"previous_names":["aligent/bitbucket-opensearch-docker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aligent/bitbucket-opensearch-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Fbitbucket-opensearch-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Fbitbucket-opensearch-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Fbitbucket-opensearch-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Fbitbucket-opensearch-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aligent","download_url":"https://codeload.github.com/aligent/bitbucket-opensearch-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Fbitbucket-opensearch-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34713789,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-08-30T16:41:59.010Z","updated_at":"2026-06-24T01:31:23.156Z","avatar_url":"https://github.com/aligent.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenSearch Docker Image for Bitbucket Pipelines\n\nThis Docker image extends the official OpenSearch image to support environment variable translation from snake_case to dot notation, making it compatible with Bitbucket Pipelines' environment variable constraints.\n\n## Features\n\n- Environment variable translation from snake_case to dot notation\n- Pre-installed plugins:\n  - analysis-icu\n  - analysis-phonetic\n\n## Docker Hub\n\nPre-built images are available on Docker Hub: `aligent/bitbucket-opensearch`\n\n```bash\ndocker pull aligent/bitbucket-opensearch:latest\ndocker pull aligent/bitbucket-opensearch:2.12.0\n```\n\n## Problem Solved\n\nBitbucket Pipelines services:\n- Cannot have custom commands or entry-points\n- Can only use environment variables with alphanumeric characters and underscores (no dots)\n\nThis image automatically translates environment variables prefixed with `OPENSEARCH_SETTING_` from snake_case to OpenSearch's dot notation configuration format.\n\n## How It Works\n\nEnvironment variables starting with `OPENSEARCH_SETTING_` are automatically translated:\n\n| Environment Variable | Translated Setting |\n|---------------------|-------------------|\n| `OPENSEARCH_SETTING_CLUSTER_NAME` | `cluster.name` |\n| `OPENSEARCH_SETTING_NODE_NAME` | `node.name` |\n| `OPENSEARCH_SETTING_HTTP_PORT` | `http.port` |\n| `OPENSEARCH_SETTING_PLUGINS_SECURITY_DISABLED` | `plugins.security.disabled` |\n\n### Special Case: Preserving Underscores\n\nUse double underscores (`__`) to preserve a single underscore in the setting name:\n\n| Environment Variable | Translated Setting |\n|---------------------|-------------------|\n| `OPENSEARCH_SETTING_CLUSTER_ROUTING_ALLOCATION_DISK_WATERMARK__LOW` | `cluster.routing.allocation.disk.watermark_low` |\n\n## Building the Image\n\n```bash\ndocker build -t your-registry/opensearch-bitbucket:latest .\n\n# Build a specific OpenSearch version\ndocker build --build-arg OPENSEARCH_VERSION=2.11.0 -t your-registry/opensearch-bitbucket:2.11.0 .\n```\n\n## Usage in Bitbucket Pipelines\n\n### bitbucket-pipelines.yml Example\n\n```yaml\ndefinitions:\n  services:\n    opensearch:\n      image: aligent/bitbucket-opensearch:latest\n      variables:\n        discovery.type: single-node\n        OPENSEARCH_INITIAL_ADMIN_PASSWORD: MyStrongPassword123!\n        OPENSEARCH_SETTING_CLUSTER_NAME: my-cluster\n        OPENSEARCH_SETTING_NODE_NAME: opensearch-node-1\n        OPENSEARCH_SETTING_HTTP_PORT: 9200\n        OPENSEARCH_SETTING_PLUGINS_SECURITY_DISABLED: true\n\npipelines:\n  default:\n    - step:\n        name: Run Tests with OpenSearch\n        services:\n          - opensearch\n        script:\n          - echo \"Waiting for OpenSearch to start...\"\n          - sleep 30\n          - curl -s http://localhost:9200\n          - # Run your tests here\n```\n\n## Testing Locally\n\n```bash\n# Build the image\ndocker build -t opensearch-bitbucket:test .\n\n# Run a test container\ndocker run -d \\\n    --name opensearch-test \\\n    -e \"discovery.type=single-node\" \\\n    -e \"OPENSEARCH_INITIAL_ADMIN_PASSWORD=MyStrongPassword123!\" \\\n    -e \"OPENSEARCH_SETTING_CLUSTER_NAME=test-cluster\" \\\n    -e \"OPENSEARCH_SETTING_NODE_NAME=test-node\" \\\n    -e \"OPENSEARCH_SETTING_PLUGINS_SECURITY_DISABLED=true\" \\\n    -p 9200:9200 \\\n    opensearch-bitbucket:test\n\n# Verify it's working\ncurl http://localhost:9200\n\n# Check the logs to see environment variable translation\ndocker logs opensearch-test 2\u003e\u00261 | grep \"Translated:\"\n\n# Cleanup\ndocker stop opensearch-test \u0026\u0026 docker rm opensearch-test\n```\n\n## Docker Hub Automated Builds\n\nThis repository is configured for Docker Hub automated builds with support for multiple OpenSearch versions.\n\n### Available Tags\n\n- `latest` - Latest stable OpenSearch version (2.12.0)\n- `2.12.0`, `2.12`, `2` - OpenSearch 2.12.0\n- Version-specific tags for other OpenSearch releases\n\n### Build Configuration\n\nThe repository includes Docker Hub build hooks for:\n- **hooks/build** - Handles version-specific builds using build arguments\n- **hooks/post_push** - Creates additional semantic version tags (e.g., 2.12.0 → 2.12, 2)\n\nTo build a specific OpenSearch version locally:\n\n```bash\ndocker build --build-arg OPENSEARCH_VERSION=2.11.0 -t opensearch-bitbucket:2.11.0 .\n```\n\n## Repository Structure\n\n- `Dockerfile` - Extends the official OpenSearch image with build argument support for version flexibility\n- `entrypoint.sh` - Custom entrypoint script that handles environment variable translation from snake_case to dot notation\n- `hooks/` - Docker Hub automated build hooks\n  - `build` - Handles version-specific builds using build arguments\n  - `post_push` - Creates additional semantic version tags (e.g., 2.12.0 → 2.12, 2)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faligent%2Fbitbucket-opensearch-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faligent%2Fbitbucket-opensearch-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faligent%2Fbitbucket-opensearch-docker/lists"}