This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-22
Channels
- # bangalore-clj (2)
- # beginners (22)
- # boot (8)
- # cider (1)
- # cljs-dev (10)
- # clojars (1)
- # clojure (5)
- # clojure-austin (14)
- # clojure-conj (1)
- # clojure-dusseldorf (6)
- # clojure-france (3)
- # clojure-russia (11)
- # clojure-spec (3)
- # clojure-uk (2)
- # clojurescript (27)
- # datomic (4)
- # hoplon (68)
- # leiningen (7)
- # off-topic (1)
- # om (68)
- # onyx (12)
- # other-languages (1)
- # re-frame (19)
- # vim (2)
Back to this after getting the kids down. Kind of pounding against a brick wall here. This is what I have so far:
(deftask docker-template
"Adds the directory to the fileset. TODO: So much more."
[d dir DIR file "Directory to add."]
(let [tmp (tmp-dir!)]
(with-pre-wrap [fs]
(empty-dir! tmp)
(-> fs
(add-resource dir)
commit!))))
(deftask build-docker-image
"Runs Docker in a shell to build an image from the fileset."
[i image-name NAME str "Name of the image to build."
v version VERSION str "Version (appended to the image name)"]
(let [work-dir (tmp-dir!)]
(with-pass-thru [fs]
(apply sync! work-dir (input-files fs))
(util/dosh "ls" "-lag" (.getPath work-dir))
(util/dosh "docker"
"-t" (str image-name ":" version)))))
In build-docker-image I’d like to create a real folder with the files added in docker-template, so that I can pass the directory to the docker command.
sync!
seems like the right thing, but I don’t have the rest. Ah, just tried (apply sync! work-dir (output-dirs fs))
and that seems happier.
@hlship take a look at the boot-bower/boot-npm tasks, I am creating a directory and passing it to an exec there also
Updated boot-bundle with some new features and unit tests. https://github.com/borkdude/boot-bundle/blob/master/README.md#versions