{"id":23535060,"url":"https://github.com/ripta/drydock","last_synced_at":"2025-04-23T04:19:53.012Z","repository":{"id":30692370,"uuid":"34248322","full_name":"ripta/drydock","owner":"ripta","description":"ruby DSL to help you build custom docker images (Proof of Concept)","archived":false,"fork":false,"pushed_at":"2016-02-20T02:27:44.000Z","size":277,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-20T08:12:20.131Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/ripta.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":"2015-04-20T08:30:31.000Z","updated_at":"2018-04-13T19:52:01.000Z","dependencies_parsed_at":"2022-08-26T09:00:35.459Z","dependency_job_id":null,"html_url":"https://github.com/ripta/drydock","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripta%2Fdrydock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripta%2Fdrydock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripta%2Fdrydock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripta%2Fdrydock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ripta","download_url":"https://codeload.github.com/ripta/drydock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250366957,"owners_count":21418806,"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-26T01:14:38.667Z","updated_at":"2025-04-23T04:19:52.990Z","avatar_url":"https://github.com/ripta.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# drydock\n\n**WARNING:** Work in progress. Although this software has test coverage, it is\nconsidered unstable. Refer to [LICENSE](LICENSE.md) for licensing information.\n\nSee section on [Compatibility](#compatibility) for a list of supported Docker\nversions for every Drydock version. See the [VERSION file](VERSION) for the\nversion of Drydock to which this source code is associated.\n\n[![Automated Build Status](https://travis-ci.org/ripta/drydock.svg)](https://travis-ci.org/ripta/drydock)\n[![Code Climate](https://codeclimate.com/github/ripta/drydock/badges/gpa.svg)](https://codeclimate.com/github/ripta/drydock)\n\nA ruby DSL to build your own docker images. Images are built based on instructions\ncontained in your project's `Drydockfile`.\n\n\n## Why not Dockerfile?\n\n[Dockerfiles](https://docs.docker.com/reference/builder/) are great to start out\nwith, but:\n\n1. **They are static,** which isn't necessarily a bad thing. I'm not opposed to\na declarative approach to building images, but _sometimes_ it may be limiting.\n2. **They are less hackable,** because `docker build` doesn't support plugins\nto expand its capabilities.\n3. **More complicated build pipelines are hard to implement,** or perhaps even\nimpossible. For instance, being able to build multiple images, then combine them\nat the end, would be a nice option. Imagine building your ruby gem dependencies\nand node.js dependencies separately, before combining both images into your\napplication's final image.\n4. **Caching rules are fairly limiting.** For instance, when your Gemfile changes,\nit would be nice to import a configurably-older image, import the new Gemfile,\nand re-run the build. On the other hand, it would be important to be able to limit\nthe age of the cache.\n\n\n## Why Drydock?\n\nDrydock interfaces directly with the [Docker Remote API](https://docs.docker.com/reference/api/docker_remote_api/)\nvia [the docker-api gem](https://github.com/swipely/docker-api/). It's\nnot for every use case, but it provides great control over what and how an image\nis built.\n\nDrydock supports plugins, either provided through ruby gems or ruby files included\nin your project being built by Drydock.\n\nDrydockfiles are written in ruby.\n\n\n## Installation\n\nEither (a) `gem install dry-dock`, or (b) add \"dry-dock\" to your project's Gemfile,\nand run `bundle`.\n\nSorry, but the gem name `drydock` was already taken by a defunct gem, and I'm too\nlazy to contact them; the binary and name of the project, however, are both `drydock`.\n\nIn your project's root directory, you'll want to create a `Drydockfile` containing\ndrydock functions. When you're ready, from your project's directory, build an image using:\n\n```\n$ bundle exec drydock\n```\n\nor `drydock` directly if you're not using bundler.\n\nAlternatively, point drydock to a directory containing the `Drydockfile`, or to any\nfile to treat it as the `Drydockfile`, e.g.:\n\n```\n$ drydock ~/source/miniproject # project directory expects a file named Drydockfile\n$ drydock ~/source/miniproject/drydock-definition.rb # expects a drydock-definition.rb\n```\n\n**Example `Drydockfile`s may be seen in the `examples/` directory of the source repo.**\n\n\n## Drydockfile Syntax\n\nAs previously mentioned, Drydockfiles are ruby. The contents of Drydockfile are\nevaluated in the context of an instance of {Drydock::Project}; you can refer to\nthe documentation for it for more in-depth information on each instruction.\n\nBecause Drydockfiles are ruby, most constructs should work as-is: you can declare\nconstants and refer to them later; call `Kernel#abort` to exit the program and\nstop the build; and write plugins to be called from within the Drydockfile.\n\nIt would help if you understand ruby and\n[Dockerfiles](https://docs.docker.com/reference/builder/) before jumping in.\n\nAll instructions are evaluated in the order that they are seen; syntax errors or\nany logical errors might not be caught until execution arrives at that point.\n\nFor a complete and updated list of Drydockfile instructions, see the public API\nmethods of the {Drydock::Project} class or head to the\n[automatically-generated ruby docs](http://www.rubydoc.info/gems/dry-dock).\n\n\n## Contributing\n\nIf you plan on hacking or contributing to drydock, fork the project, create a new\nbranch, make your changes, commit, and open a pull request.\n\nAfter cloning your repo, `bundle` should take care of it.\n\n\n## Release\n\n```\n$ bundle\n$ # increment VERSION file\n$ bundle exec rake gemspec build\n$ # upload .gem file to rubygems.org\n```\n\n\n## Roadmap\n\n1. Customizable caching subsystem with pluggable caching strategies.\n2. Squashing layers together, with cache support.\n3. Unarchiving a file directly into a container.\n4. Proper `ONBUILD` implementation and expanded support for hooks.\n5. Drydock instructions corresponding to `LABEL`, `VOLUME`, `USER`, and `WORKDIR` Docker instructions.\n\n\n## Compatibility\n\nThe following version combinations are officially tested and supported:\n\n| Docker Versions | Drydock Versions |\n| --------------- | ---------------- |\n| v1.8.0          | v0.1.0 onwards   |\n| v1.9.0          | v0.2.0 onwards   |\n\nDocker v1.7 or earlier is not officially supported, but most functionality should\nwork, with the exception of:\n\n* The `copy` command, which may fail when unpacking into the root `/` of the container.\n* The `import` command, which requires the `/containers/(id)/archive`. Earlier\n  versions of the Docker Remote API implemented `/containers/(id)/copy`; if you'd\n  like to add graceful fallback using the aforementioned, contributions are welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fripta%2Fdrydock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fripta%2Fdrydock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fripta%2Fdrydock/lists"}