{"id":29673893,"url":"https://github.com/minhtuannguyen/cljocker","last_synced_at":"2026-03-06T02:07:50.505Z","repository":{"id":44928557,"uuid":"62883618","full_name":"minhtuannguyen/cljocker","owner":"minhtuannguyen","description":"A simple DSL to build Dockerfile","archived":false,"fork":false,"pushed_at":"2018-09-05T08:00:11.000Z","size":27,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-30T11:52:01.368Z","etag":null,"topics":["clojure","docker","dockerfile","dockerfiles","dsl","infrastructure","infrastructure-as-code"],"latest_commit_sha":null,"homepage":"https://github.com/minhtuannguyen/cljocker","language":"Clojure","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/minhtuannguyen.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":"2016-07-08T11:24:25.000Z","updated_at":"2025-05-17T11:52:49.000Z","dependencies_parsed_at":"2022-08-25T14:12:20.905Z","dependency_job_id":null,"html_url":"https://github.com/minhtuannguyen/cljocker","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/minhtuannguyen/cljocker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minhtuannguyen%2Fcljocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minhtuannguyen%2Fcljocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minhtuannguyen%2Fcljocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minhtuannguyen%2Fcljocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/minhtuannguyen","download_url":"https://codeload.github.com/minhtuannguyen/cljocker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minhtuannguyen%2Fcljocker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266580928,"owners_count":23951319,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["clojure","docker","dockerfile","dockerfiles","dsl","infrastructure","infrastructure-as-code"],"created_at":"2025-07-22T22:08:32.895Z","updated_at":"2026-03-06T02:07:45.454Z","avatar_url":"https://github.com/minhtuannguyen.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cljocker\n[![Build Status](https://travis-ci.org/minhtuannguyen/cljocker.svg?branch=master)](https://travis-ci.org/minhtuannguyen/cljocker)\n[![Coverage Status](https://coveralls.io/repos/github/minhtuannguyen/cljocker/badge.svg?branch=master)](https://coveralls.io/github/minhtuannguyen/cljocker?branch=master)\n[![Dependencies Status](https://versions.deps.co/minhtuannguyen/cljocker/status.svg)](https://versions.deps.co/minhtuannguyen/cljocker)\n[![Downloads](https://versions.deps.co/minhtuannguyen/cljocker/downloads.svg)](https://versions.deps.co/minhtuannguyen/cljocker)\n\n[![Clojars Project](http://clojars.org/minhtuannguyen/cljocker/latest-version.svg)](https://clojars.org/minhtuannguyen/cljocker)\n\nA simple DSL to define and generate Dockerfile\n\n## Examples\n\nTo generate a Dockerfile from spec:\n\n```clojure\n(:require [cljocker.hh.dsl.docker :as d])\n            \n(defn- heap [heap] (str \"-Xmx=\" heap \"m \"))\n(defn- port [port] (str \"-Dport=\" port))\n\n(-\u003e [:from     \"java:8\"\n                :run      (lazy-seq [\"mkdir\" \"-p\" \"/var/opt/folder\"])\n                :user     \"nobody\"\n                :add      [\"from\" \"to\"]\n                :workdir  \"/var/opt/folder\"\n                :cmd      [\"java\" (heap 512) (port 512) [\"-jar\" \"artifact.jar\"]]]\n    (d/new-dockerfile)\n    (d/write! \"path/to/dockerfile\"))    \n```\n\nThe content of the generated Dockerfile will be:\n\n```shell\nFROM java:8\nRUN mkdir -p /var/opt/folder\nUSER nobody\nADD from to\nWORKDIR /var/opt/folder\nCMD java  -Xmx=512m  -Dport=512  -jar artifact.jar    \n```\n\nTo validate a dockerfile spec:\n\n```clojure\n(:require [cljocker.hh.dsl.docker :as d])\n            \n(is (= [:valid]\n       (-\u003e [:from \"image\" :cmd \"echo\"]\n           (d/new-dockerfile)\n           (d/validate))))   \n       \n(is (= [:invalid \"first instruction must be FROM\"]\n       (-\u003e [:cmd \"echo\"]\n           (d/new-dockerfile)\n           (d/validate))))\n```\n\n\n## License\n\nCopyright © 2016 \nDistributed under the Eclipse Public License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminhtuannguyen%2Fcljocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminhtuannguyen%2Fcljocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminhtuannguyen%2Fcljocker/lists"}