 (ns cljocker.hh.dsl.docker
+  (:refer-clojure :exclude [resolve])
   (:require [clojure.string :as s]
             [clojure.test :refer :all]
             [clojure.set :refer :all]))

       (docker spec [])
       (throw (new IllegalArgumentException reason)))))
  ([[instruction args & rest] m]
   (let [m (build instruction args m)]
     (if (seq rest)
       (docker rest m) m))))


   " "
   (s/join " " v)))

(defn- resolve [args]
  (cond
    (vector? args) args
    (seq? args) (vec args)
    (function? args) (args)
    :else [args]))

(defn- build-instruction [instruction args m]
  (if (contains? INSTRUCTIONS instruction)
    (->> args
         (resolve)
         (instruction-concat instruction)
         (conj m))
    m))

(defn validate [[first & rest :as spec]]
  (cond
