dockerfile-0.2.0: A Haskell DSL for generating Dockerfiles

Safe HaskellSafe
LanguageHaskell2010

Data.Docker

Contents

Description

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

Types

type Docker a = Writer DockerFile a Source #

A Docker writer monad for creating Dockerfiles

data CopyOpt Source #

Instances
Show CopyOpt Source # 
Instance details

Defined in Data.Docker

dockerfile :: Docker a -> String Source #

Render a list of Docker instructions to a String.

dockerfileWrite :: FilePath -> Docker a -> IO () Source #

Render a list of Docker instructions to a FilePath.

Docker Instructions

fromas :: String -> As -> Docker () Source #

run :: Script -> Docker () Source #

cmd :: [ScriptFile] -> Docker () Source #

entrypoint :: FilePath -> [Param] -> Docker () Source #

onbuild :: Instruction -> Docker () Source #