Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
A Simple Dockerfile DSL for Haskell
main :: IO () main = do let df = dockerfile $ do from "debian:trusty" maintainer "creichert creichert07@gmail.com" run "apt-get -y update " run "apt-get -y upgrade" cmd [ "echo", "hello world"] putStrLn df
- type Docker a = Writer DockerFile a
- dockerfile :: Docker a -> String
- from :: String -> Docker ()
- maintainer :: String -> Docker ()
- run :: Script -> Docker ()
- env :: String -> String -> Docker ()
- add :: FilePath -> FilePath -> Docker ()
- expose :: Int -> Docker ()
- copy :: FilePath -> FilePath -> Docker ()
- cmd :: [ScriptFile] -> Docker ()
- entrypoint :: FilePath -> [Param] -> Docker ()
- user :: String -> Docker ()
- workdir :: FilePath -> Docker ()
- volume :: [FilePath] -> Docker ()
Types
dockerfile :: Docker a -> String Source
Docker Instructions
maintainer :: String -> Docker () Source
entrypoint :: FilePath -> [Param] -> Docker () Source