Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
A Simple DSL for describing and generating Dockerfiles in Haskell
Compatible w/ Docker v18.03
main :: IO () main = putStrLn $ dockerfile $ do from "debian:stable" maintainer "creichert creichert07@gmail.com" run "apt-get -y update" run "apt-get -y upgrade" cmd [ "echo", "hello world"]
Synopsis
- type Docker a = Writer DockerFile a
- data CopyOpt
- dockerfile :: Docker a -> String
- dockerfileWrite :: FilePath -> Docker a -> IO ()
- from :: String -> Docker ()
- fromas :: String -> As -> Docker ()
- run :: Script -> Docker ()
- cmd :: [ScriptFile] -> Docker ()
- label :: [(String, String)] -> Docker ()
- maintainer :: String -> Docker ()
- expose :: Int -> Docker ()
- env :: String -> String -> Docker ()
- add :: [FilePath] -> FilePath -> Docker ()
- addchown :: [String] -> [FilePath] -> FilePath -> Docker ()
- copy :: [FilePath] -> FilePath -> Docker ()
- copyfrom :: String -> [FilePath] -> FilePath -> Docker ()
- copychown :: [String] -> [FilePath] -> FilePath -> Docker ()
- entrypoint :: FilePath -> [Param] -> Docker ()
- volume :: [FilePath] -> Docker ()
- user :: String -> Docker ()
- workdir :: FilePath -> Docker ()
- arg :: String -> Maybe String -> Docker ()
- onbuild :: Instruction -> Docker ()
- stopsignal :: String -> Docker ()
- healthcheck :: Maybe ([String], String) -> Docker ()
- shell :: String -> Docker ()
Types
Docker Instructions
maintainer :: String -> Docker () Source #
entrypoint :: FilePath -> [Param] -> Docker () Source #
stopsignal :: String -> Docker () Source #