{"id":51312464,"url":"https://github.com/datacite/docker-canis-base","last_synced_at":"2026-07-01T05:03:02.493Z","repository":{"id":364299234,"uuid":"1251332436","full_name":"datacite/docker-canis-base","owner":"datacite","description":"\"The architectural genus for our container fleet. Unified Phusion Passenger \u0026 Ruby on Rails base image powering Lupo, Levriero, Volpino, Events, Sashimi, and Poodle.\"","archived":false,"fork":false,"pushed_at":"2026-06-12T12:25:18.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-12T14:17:03.312Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datacite.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2026-05-27T13:26:31.000Z","updated_at":"2026-06-12T12:24:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/datacite/docker-canis-base","commit_stats":null,"previous_names":["datacite/docker-canis-base"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/datacite/docker-canis-base","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datacite%2Fdocker-canis-base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datacite%2Fdocker-canis-base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datacite%2Fdocker-canis-base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datacite%2Fdocker-canis-base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datacite","download_url":"https://codeload.github.com/datacite/docker-canis-base/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datacite%2Fdocker-canis-base/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34993438,"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-07-01T02:00:05.325Z","response_time":130,"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":"2026-07-01T05:03:01.737Z","updated_at":"2026-07-01T05:03:02.488Z","avatar_url":"https://github.com/datacite.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Canis Base\n\nTwo images for the DataCite Canis family of Rails services.\n\n### Images\n\n| Image                        | Purpose                                      | Recommended for          |\n|------------------------------|----------------------------------------------|--------------------------|\n| `canis-base`                 | Slim shared foundation                       | All services             |\n| `canis-base-tools`           | `canis-base` + Percona Toolkit + AWS CLI + dockerize | Lupo and heavy services  |\n\n### Philosophy\n\n- Keep the core base as small as reasonably possible.\n- Put heavy operational tooling (Percona Toolkit, AWS CLI) into a separate image that builds on top of the base.\n- Most services are being merged into Lupo, so we only need two images for now.\n- Operational simplicity remains the top priority.\n\n## Quick Start\n\nThe release workflow will automatically build and push both images to **both Docker Hub (`datacite/...`) and GHCR (`ghcr.io/datacite/...`)** using `github.ref_name` (the tag, e.g. `v1.2.3`) + the commit hash.\n\n### Build both images locally (for testing)\n\n```bash\n# 1. Build the slim core base\ndocker buildx build \\\n  --platform linux/amd64 \\\n  --tag canis-base:local \\\n  --load \\\n  -f Dockerfile .\n\n# 2. Build the tools variant on top of the local base\ndocker buildx build \\\n  --platform linux/amd64 \\\n  --tag canis-base-tools:local \\\n  --load \\\n  --build-arg BASE_IMAGE=canis-base:local \\\n  -f Dockerfile.tools .\n```\n\n### Usage in application Dockerfiles\n\n**Lupo (and other heavy services):**\n\n```dockerfile\nFROM ghcr.io/datacite/canis-base-tools:v1.2.3\n```\n\nFor maximum reproducibility you can also pin to the exact hash:\n\n```dockerfile\nFROM ghcr.io/datacite/canis-base-tools:7f3a2c1d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f\n```\n\n**Lighter services:**\n\n```dockerfile\nFROM ghcr.io/datacite/canis-base:v1.2.3\n```\n\n## What's in each image\n\n**`canis-base`** (slim core)\n- `phusion/passenger-ruby40` base (Ubuntu 24.04)\n- Ruby 4.0 + rubygems 3.5.6 + bundler 2.6.9\n- Passenger + Nginx setup\n- Common native gem build dependencies (mysql2, nokogiri, etc.)\n- Basic operational tools (ntp, curl, git, jq, etc.)\n- Standard Phusion layout and permissions\n- Common `vendor/docker/` files baked in (see below)\n\n**`canis-base-tools`** (adds on top of the base)\n- Percona Toolkit 3.7.1 + Perl DBI libraries\n- AWS CLI v2 (used by Lupo for Passenger → CloudWatch metrics)\n- dockerize\n\n## Common `vendor/docker/` files (now in the base)\n\nPreviously, every app duplicated files in their own `vendor/docker/`. We have centralized the common ones here so they match the naming and structure used in other DataCite repos (lupo, levriero, volpino, etc.).\n\nThe following files are now provided by the base image (baked in during the base image build) from `vendor/docker/`:\n\n- `vendor/docker/00_app_env.conf` -\u003e `/etc/nginx/conf.d/00_app_env.conf` (common env passthrough; apps can override)\n- `vendor/docker/ntp.conf` -\u003e `/etc/ntp.conf`\n- `vendor/docker/10_ssh.sh` -\u003e `/etc/my_init.d/10_ssh.sh`\n- `vendor/docker/90_migrate.sh` -\u003e `/etc/my_init.d/90_migrate.sh`\n- `vendor/docker/shoryuken.sh` -\u003e `/etc/service/shoryuken/run`\n\n**How to customize:**\n- If your service needs a different version of any of these, simply `COPY` your own file from your app's `vendor/docker/` in your Dockerfile *after* the `FROM` line. It will override the baked-in version from the base.\n- Service-specific files (e.g. custom `webapp.conf` / `webapp.conf.template`, Lupo's `70_nginx_templates.sh`, Volpino's `70_precompile.sh`, Lupo's metrics script) should remain in your app's own `vendor/docker/`.\n\nSee `vendor/docker/` in this repo for the exact current versions of the shared files. This naming makes it easy to compare with the files in your app repo.\n\n## Tagging Strategy (Semantic Versioning)\n\nAll DataCite images follow semantic versioning.\n\nReleases are driven by git tags (e.g. `1.2.3`).\n\nThe workflow uses `github.ref_name` (the tag name) for the semantic version and `github.sha` for the full commit hash.\n\nFor each release the following tags are pushed for both images:\n\n- `latest`\n- `1.2.3` (from `github.ref_name`)\n- `\u003cfull 40-character commit SHA\u003e` (the hash)\n\nExample production pins:\n\n```dockerfile\n# Recommended (human readable + reproducible)\nFROM ghcr.io/datacite/canis-base-tools:1.2.3\n\n# Maximum reproducibility (pin to the exact hash)\nFROM ghcr.io/datacite/canis-base-tools:7f3a2c1d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\n```\n\nThe `canis-base-tools` image is always built against the **exact same commit** of `canis-base` (via the build arg using the SHA). This guarantees that `canis-base-tools:1.2.3` was built on top of `canis-base:1.2.3` (same tree).\n\n## Ruby version\n\nBoth images only support **Ruby 4.x**.\n\n## Example Usage\n\n### Lupo (or other heavy services)\n\n```dockerfile\n# syntax=docker/dockerfile:1.7\nFROM ghcr.io/datacite/canis-base-tools:1.2.3\n\nLABEL maintainer=\"support@datacite.org\"\n\nENV NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx/sites-enabled\n\n# Lupo-specific files\nCOPY vendor/docker/webapp.conf.template /etc/nginx/templates/webapp.conf.template\nCOPY vendor/docker/70_nginx_templates.sh /etc/my_init.d/70_nginx_templates.sh\n\nRUN mkdir -p /etc/service/passenger-metrics\nCOPY vendor/docker/passenger-metrics-run.sh /etc/service/passenger-metrics/run\n\nCOPY vendor/docker/00_app_env.conf /etc/nginx/conf.d/00_app_env.conf\nCOPY vendor/docker/ntp.conf /etc/ntp.conf\n\nRUN mkdir -p /etc/service/shoryuken\nCOPY vendor/docker/shoryuken.sh /etc/service/shoryuken/run\n\nCOPY vendor/docker/10_ssh.sh /etc/my_init.d/10_ssh.sh\nCOPY vendor/docker/90_migrate.sh /etc/my_init.d/90_migrate.sh\n\nCOPY . /home/app/webapp/\nRUN mkdir -p tmp/pids tmp/storage \u0026\u0026 \\\n    chown -R app:app /home/app/webapp \u0026\u0026 \\\n    chmod -R 755 /home/app/webapp\n\nWORKDIR /home/app/webapp\nRUN mkdir -p vendor/bundle \u0026\u0026 \\\n    chown -R app:app . \u0026\u0026 \\\n    /sbin/setuser app bundle config set --local path 'vendor/bundle' \u0026\u0026 \\\n    /sbin/setuser app bundle install\n\nEXPOSE 80\n```\n\n### Lighter services\n\n```dockerfile\nFROM ghcr.io/datacite/canis-base:1.0.1\n\n# Add only what is unique to your service\n```\n\n## Building Locally\n\n```bash\n# Slim core base\ndocker build -f Dockerfile -t canis-base:local .\n\n# Tools variant\ndocker build -f Dockerfile.tools -t canis-base-tools:local .\n```\n\n## Maintenance\n\n- Rebuild `Dockerfile` when changing core packages or Ruby setup.\n- Rebuild `Dockerfile.tools` mainly when updating Percona Toolkit or AWS CLI.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatacite%2Fdocker-canis-base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatacite%2Fdocker-canis-base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatacite%2Fdocker-canis-base/lists"}