-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Embedded DSL to create Dockerfiles using Haskell. Please see the -- README on GitHub at -- https://github.com/hadolint/dockerfile-creator#readme @package dockerfile-creator @version 0.1.1.0 module Language.Docker.EDSL -- | The type of Identity based EDSL blocks type EDockerfileM = Free EInstruction -- | The type of free monad EDSL blocks type EDockerfileTM = FreeT EInstruction type EInstructionM = Free EInstruction type EInstructionTM = FreeT EInstruction embed :: forall m_aaLI. MonadFree EInstruction m_aaLI => [InstructionPos Text] -> m_aaLI () onBuildRaw :: forall m_aaLF. MonadFree EInstruction m_aaLF => Instruction Text -> m_aaLF () healthcheck :: forall m_aaLC. MonadFree EInstruction m_aaLC => Check Text -> m_aaLC () comment :: forall m_aaLz. MonadFree EInstruction m_aaLz => Text -> m_aaLz () arg :: forall m_aaLv. MonadFree EInstruction m_aaLv => Text -> Maybe Text -> m_aaLv () env :: forall m_aaLs. MonadFree EInstruction m_aaLs => Pairs -> m_aaLs () maintainer :: forall m_aaLp. MonadFree EInstruction m_aaLp => Text -> m_aaLp () entrypointArgs :: forall m_aaLm. MonadFree EInstruction m_aaLm => Arguments Text -> m_aaLm () volume :: forall m_aaLj. MonadFree EInstruction m_aaLj => Text -> m_aaLj () expose :: forall m_aaLg. MonadFree EInstruction m_aaLg => Ports -> m_aaLg () workdir :: forall m_aaLd. MonadFree EInstruction m_aaLd => Directory -> m_aaLd () shell :: forall m_aaLa. MonadFree EInstruction m_aaLa => Arguments Text -> m_aaLa () cmdArgs :: forall m_aaL7. MonadFree EInstruction m_aaL7 => Arguments Text -> m_aaL7 () runArgs :: forall m_aaL3. MonadFree EInstruction m_aaL3 => Arguments Text -> RunFlags -> m_aaL3 () copyArgs :: forall m_aaKW. MonadFree EInstruction m_aaKW => NonEmpty SourcePath -> TargetPath -> Chown -> Chmod -> CopySource -> m_aaKW () stopSignal :: forall m_aaKT. MonadFree EInstruction m_aaKT => Text -> m_aaKT () label :: forall m_aaKQ. MonadFree EInstruction m_aaKQ => Pairs -> m_aaKQ () user :: forall m_aaKN. MonadFree EInstruction m_aaKN => Text -> m_aaKN () addArgs :: forall m_aaKH. MonadFree EInstruction m_aaKH => NonEmpty SourcePath -> TargetPath -> Chown -> Chmod -> m_aaKH () from :: forall m_aaKy. MonadFree EInstruction m_aaKy => EBaseImage -> m_aaKy () runDockerWriter :: MonadWriter [Instruction Text] m => EDockerfileM a -> m a runDockerWriterIO :: (Monad m, MonadTrans t, MonadWriter [Instruction Text] (t m)) => EDockerfileTM m a -> t m a runDef :: MonadWriter [t] m => (t1 -> t) -> t1 -> m b -> m b runDef2 :: MonadWriter [t] m => (t1 -> t2 -> t) -> t1 -> t2 -> m b -> m b runD :: MonadWriter [Instruction Text] m => EInstruction (m b) -> m b instructionPos :: Instruction args -> InstructionPos args -- | Runs the Dockerfile EDSL and returns a Dockerfile you can -- pretty print or manipulate toDockerfile :: EDockerfileM a -> Dockerfile -- | runs the Dockerfile EDSL and returns a Lazy using -- PrettyPrint -- --
--   import Language.Docker
--   
--   main :: IO ()
--   main = print $ toDockerfileText $ do
--       from (tagged "fpco/stack-build" "lts-6.9")
--       add ["."] "applanguage-docker"
--       workdir "applanguage-docker"
--       run "stack build --test --only-dependencies"
--       cmd "stack test"
--   
toDockerfileText :: EDockerfileM a -> Text -- | Writes the dockerfile to the given file path after pretty-printing it -- --
--   import Language.Docker
--   
--   main :: IO ()
--   main = writeDockerFile "build.Dockerfile" $ toDockerfile $ do
--       from (tagged "fpco/stack-build" "lts-6.9")
--       add ["."] "applanguage-docker"
--       workdir "applanguage-docker"
--       run "stack build --test --only-dependencies"
--       cmd "stack test"
--   
writeDockerFile :: Text -> Dockerfile -> IO () -- | Prints the dockerfile to stdout. Mainly used for debugging purposes -- --
--   import Language.Docker
--   
--   main :: IO ()
--   main = putDockerfileStr $ do
--       from (tagged "fpco/stack-build" "lts-6.9")
--       add ["."] "applanguage-docker"
--       workdir "applanguage-docker"
--       run "stack build --test --only-dependencies"
--       cmd "stack test"
--   
putDockerfileStr :: EDockerfileM a -> IO () -- | Use a docker image in a FROM instruction without a tag -- -- The following two examples are equivalent -- --
--   from $ untagged "fpco/stack-build"
--   
-- -- Is equivalent to, when having OverloadedStrings: -- --
--   from "fpco/stack-build"
--   
untagged :: Text -> EBaseImage -- | Use a specific tag for a docker image. This function is meant to be -- used as an infix operator. -- --
--   from $ "fpco/stack-build" tagged "lts-10.3"
--   
tagged :: Image -> Tag -> EBaseImage -- | Adds a digest checksum so a FROM instruction This function is meant to -- be used as an infix operator. -- --
--   from $ "fpco/stack-build" digested "sha256:abcdef123"
--   
digested :: EBaseImage -> Digest -> EBaseImage -- | Alias a FROM instruction to be used as a build stage. This function is -- meant to be used as an infix operator. -- --
--   from $ "fpco/stack-build" aliased "builder"
--   
aliased :: EBaseImage -> ImageAlias -> EBaseImage -- | Create a RUN instruction with the given arguments. -- --
--   run "apt-get install wget"
--   
run :: MonadFree EInstruction m => Arguments Text -> m () -- | Create an ENTRYPOINT instruction with the given arguments. -- --
--   entrypoint "usrlocalbinprogram --some-flag"
--   
entrypoint :: MonadFree EInstruction m => Arguments Text -> m () -- | Create a CMD instruction with the given arguments. -- --
--   cmd "my-program --some-flag"
--   
cmd :: MonadFree EInstruction m => Arguments Text -> m () -- | Create a COPY instruction. This function is meant to be used with the -- compinators to, fromStage and ownedBy -- --
--   copy $ ["foo.js", "bar.js"] to "."
--   copy $ ["some_file"] to "somepath" fromStage "builder"
--   
copy :: MonadFree EInstruction m => CopyArgs -> m () -- | Create a COPY instruction from a given build stage. This is a -- shorthand version of using copy with combinators. -- --
--   copyFromStage "builder" ["foo.js", "bar.js"] "."
--   
copyFromStage :: MonadFree EInstruction m => CopySource -> NonEmpty SourcePath -> TargetPath -> m () -- | Create an ADD instruction. This is often used as a shorthand version -- of copy when no extra options are needed. Currently there is no way to -- pass extra options to ADD, so you are encouraged to use copy -- instead. -- --
--   add ["foo.js", "bar.js"] "."
--   
add :: MonadFree EInstruction m => NonEmpty SourcePath -> TargetPath -> m () -- | Converts a NonEmpty list of strings to a NonEmpty list of -- SourcePath -- -- This is a convenience function when you need to pass a non-static list -- of strings that you build somewhere as an argument for copy or -- add -- --
--   someFiles <- glob "*.js"
--   copy $ (toSources someFiles) to "."
--   
toSources :: NonEmpty Text -> NonEmpty SourcePath -- | Converts a Text into a TargetPath -- -- This is a convenience function when you need to pass a string variable -- as an argument for copy or add -- --
--   let destination = buildSomePath pwd
--   add ["foo.js"] (toTarget destination)
--   
toTarget :: Text -> TargetPath -- | Adds the --from= option to a COPY instruction. -- -- This function is meant to be used as an infix operator: -- --
--   copy $ ["foo.js"] to "." fromStage "builder"
--   
fromStage :: CopyArgs -> CopySource -> CopyArgs -- | Adds the --chown= option to a COPY instruction. -- -- This function is meant to be used as an infix operator: -- --
--   copy $ ["foo.js"] to "." ownedBy "www-data:www-data"
--   
ownedBy :: CopyArgs -> Chown -> CopyArgs -- | Usedto join source paths with atarget path as an arguments for -- copy -- -- This function is meant to be used as an infix operator: -- --
--   copy $ ["foo.js"] to "." ownedBy
--   
to :: NonEmpty SourcePath -> TargetPath -> CopyArgs ports :: [Port] -> Ports tcpPort :: Int -> Port udpPort :: Int -> Port variablePort :: Text -> Port portRange :: Int -> Int -> Port udpPortRange :: Int -> Int -> Port check :: Arguments args -> Check args interval :: Check args -> Integer -> Check args timeout :: Check args -> Integer -> Check args startPeriod :: Check args -> Integer -> Check args retries :: Check args -> Integer -> Check args noCheck :: Check args -- | ONBUILD Dockerfile instruction -- -- Each nested instruction gets emitted as a separate ONBUILD -- block -- --
--   toDockerfile $ do
--       from "node"
--       run "apt-get update"
--       onBuild $ do
--           run "echo more-stuff"
--           run "echo here"
--   
onBuild :: MonadFree EInstruction m => EDockerfileM a -> m () -- | A version of toDockerfile which allows IO actions toDockerfileIO :: MonadIO m => EDockerfileTM m t -> m Dockerfile -- | A version of toDockerfileText which allows IO actions toDockerfileTextIO :: MonadIO m => EDockerfileTM m t -> m Text -- | Just runs the EDSL's writer monad runDockerfileIO :: MonadIO m => EDockerfileTM m t -> m (t, Dockerfile) -- | Runs the EDSL's writer monad and pretty-prints the result runDockerfileTextIO :: MonadIO m => EDockerfileTM m t -> m (t, Text) module Language.Docker.EDSL.Quasi -- | Quasiquoter for embedding dockerfiles on the EDSL -- --
--   putStr $ toDockerfile $ do
--       from "node"
--       run "apt-get update"
--       [edockerfile|
--       RUN apt-get update
--       CMD node something.js
--       |]
--   
edockerfile :: QuasiQuoter edockerfileE :: String -> ExpQ dockerfile :: QuasiQuoter dockerfileE :: String -> ExpQ module Language.Docker.Creator -- | runs the Dockerfile EDSL and returns a Lazy using -- PrettyPrint -- --
--   import Language.Docker
--   
--   main :: IO ()
--   main = print $ toDockerfileText $ do
--       from (tagged "fpco/stack-build" "lts-6.9")
--       add ["."] "applanguage-docker"
--       workdir "applanguage-docker"
--       run "stack build --test --only-dependencies"
--       cmd "stack test"
--   
toDockerfileText :: EDockerfileM a -> Text -- | Runs the Dockerfile EDSL and returns a Dockerfile you can -- pretty print or manipulate toDockerfile :: EDockerfileM a -> Dockerfile -- | Prints the dockerfile to stdout. Mainly used for debugging purposes -- --
--   import Language.Docker
--   
--   main :: IO ()
--   main = putDockerfileStr $ do
--       from (tagged "fpco/stack-build" "lts-6.9")
--       add ["."] "applanguage-docker"
--       workdir "applanguage-docker"
--       run "stack build --test --only-dependencies"
--       cmd "stack test"
--   
putDockerfileStr :: EDockerfileM a -> IO () -- | Writes the dockerfile to the given file path after pretty-printing it -- --
--   import Language.Docker
--   
--   main :: IO ()
--   main = writeDockerFile "build.Dockerfile" $ toDockerfile $ do
--       from (tagged "fpco/stack-build" "lts-6.9")
--       add ["."] "applanguage-docker"
--       workdir "applanguage-docker"
--       run "stack build --test --only-dependencies"
--       cmd "stack test"
--   
writeDockerFile :: Text -> Dockerfile -> IO () -- | A version of toDockerfileText which allows IO actions toDockerfileTextIO :: MonadIO m => EDockerfileTM m t -> m Text -- | A version of toDockerfile which allows IO actions toDockerfileIO :: MonadIO m => EDockerfileTM m t -> m Dockerfile -- | Just runs the EDSL's writer monad runDockerfileIO :: MonadIO m => EDockerfileTM m t -> m (t, Dockerfile) -- | Runs the EDSL's writer monad and pretty-prints the result runDockerfileTextIO :: MonadIO m => EDockerfileTM m t -> m (t, Text) -- | Lift a computation from the IO monad. liftIO :: MonadIO m => IO a -> m a from :: forall m_aaKy. MonadFree EInstruction m_aaKy => EBaseImage -> m_aaKy () -- | Use a specific tag for a docker image. This function is meant to be -- used as an infix operator. -- --
--   from $ "fpco/stack-build" tagged "lts-10.3"
--   
tagged :: Image -> Tag -> EBaseImage -- | Use a docker image in a FROM instruction without a tag -- -- The following two examples are equivalent -- --
--   from $ untagged "fpco/stack-build"
--   
-- -- Is equivalent to, when having OverloadedStrings: -- --
--   from "fpco/stack-build"
--   
untagged :: Text -> EBaseImage -- | Adds a digest checksum so a FROM instruction This function is meant to -- be used as an infix operator. -- --
--   from $ "fpco/stack-build" digested "sha256:abcdef123"
--   
digested :: EBaseImage -> Digest -> EBaseImage -- | Alias a FROM instruction to be used as a build stage. This function is -- meant to be used as an infix operator. -- --
--   from $ "fpco/stack-build" aliased "builder"
--   
aliased :: EBaseImage -> ImageAlias -> EBaseImage -- | Create an ADD instruction. This is often used as a shorthand version -- of copy when no extra options are needed. Currently there is no way to -- pass extra options to ADD, so you are encouraged to use copy -- instead. -- --
--   add ["foo.js", "bar.js"] "."
--   
add :: MonadFree EInstruction m => NonEmpty SourcePath -> TargetPath -> m () user :: forall m_aaKN. MonadFree EInstruction m_aaKN => Text -> m_aaKN () label :: forall m_aaKQ. MonadFree EInstruction m_aaKQ => Pairs -> m_aaKQ () stopSignal :: forall m_aaKT. MonadFree EInstruction m_aaKT => Text -> m_aaKT () -- | Create a COPY instruction. This function is meant to be used with the -- compinators to, fromStage and ownedBy -- --
--   copy $ ["foo.js", "bar.js"] to "."
--   copy $ ["some_file"] to "somepath" fromStage "builder"
--   
copy :: MonadFree EInstruction m => CopyArgs -> m () -- | Create a COPY instruction from a given build stage. This is a -- shorthand version of using copy with combinators. -- --
--   copyFromStage "builder" ["foo.js", "bar.js"] "."
--   
copyFromStage :: MonadFree EInstruction m => CopySource -> NonEmpty SourcePath -> TargetPath -> m () -- | Usedto join source paths with atarget path as an arguments for -- copy -- -- This function is meant to be used as an infix operator: -- --
--   copy $ ["foo.js"] to "." ownedBy
--   
to :: NonEmpty SourcePath -> TargetPath -> CopyArgs -- | Adds the --from= option to a COPY instruction. -- -- This function is meant to be used as an infix operator: -- --
--   copy $ ["foo.js"] to "." fromStage "builder"
--   
fromStage :: CopyArgs -> CopySource -> CopyArgs -- | Adds the --chown= option to a COPY instruction. -- -- This function is meant to be used as an infix operator: -- --
--   copy $ ["foo.js"] to "." ownedBy "www-data:www-data"
--   
ownedBy :: CopyArgs -> Chown -> CopyArgs -- | Converts a NonEmpty list of strings to a NonEmpty list of -- SourcePath -- -- This is a convenience function when you need to pass a non-static list -- of strings that you build somewhere as an argument for copy or -- add -- --
--   someFiles <- glob "*.js"
--   copy $ (toSources someFiles) to "."
--   
toSources :: NonEmpty Text -> NonEmpty SourcePath -- | Converts a Text into a TargetPath -- -- This is a convenience function when you need to pass a string variable -- as an argument for copy or add -- --
--   let destination = buildSomePath pwd
--   add ["foo.js"] (toTarget destination)
--   
toTarget :: Text -> TargetPath -- | Create a RUN instruction with the given arguments. -- --
--   run "apt-get install wget"
--   
run :: MonadFree EInstruction m => Arguments Text -> m () runArgs :: forall m_aaL3. MonadFree EInstruction m_aaL3 => Arguments Text -> RunFlags -> m_aaL3 () -- | Create a CMD instruction with the given arguments. -- --
--   cmd "my-program --some-flag"
--   
cmd :: MonadFree EInstruction m => Arguments Text -> m () cmdArgs :: forall m_aaL7. MonadFree EInstruction m_aaL7 => Arguments Text -> m_aaL7 () healthcheck :: forall m_aaLC. MonadFree EInstruction m_aaLC => Check Text -> m_aaLC () check :: Arguments args -> Check args interval :: Check args -> Integer -> Check args timeout :: Check args -> Integer -> Check args startPeriod :: Check args -> Integer -> Check args retries :: Check args -> Integer -> Check args workdir :: forall m_aaLd. MonadFree EInstruction m_aaLd => Directory -> m_aaLd () expose :: forall m_aaLg. MonadFree EInstruction m_aaLg => Ports -> m_aaLg () ports :: [Port] -> Ports tcpPort :: Int -> Port udpPort :: Int -> Port variablePort :: Text -> Port portRange :: Int -> Int -> Port udpPortRange :: Int -> Int -> Port volume :: forall m_aaLj. MonadFree EInstruction m_aaLj => Text -> m_aaLj () -- | Create an ENTRYPOINT instruction with the given arguments. -- --
--   entrypoint "usrlocalbinprogram --some-flag"
--   
entrypoint :: MonadFree EInstruction m => Arguments Text -> m () entrypointArgs :: forall m_aaLm. MonadFree EInstruction m_aaLm => Arguments Text -> m_aaLm () maintainer :: forall m_aaLp. MonadFree EInstruction m_aaLp => Text -> m_aaLp () env :: forall m_aaLs. MonadFree EInstruction m_aaLs => Pairs -> m_aaLs () arg :: forall m_aaLv. MonadFree EInstruction m_aaLv => Text -> Maybe Text -> m_aaLv () comment :: forall m_aaLz. MonadFree EInstruction m_aaLz => Text -> m_aaLz () -- | ONBUILD Dockerfile instruction -- -- Each nested instruction gets emitted as a separate ONBUILD -- block -- --
--   toDockerfile $ do
--       from "node"
--       run "apt-get update"
--       onBuild $ do
--           run "echo more-stuff"
--           run "echo here"
--   
onBuild :: MonadFree EInstruction m => EDockerfileM a -> m () onBuildRaw :: forall m_aaLF. MonadFree EInstruction m_aaLF => Instruction Text -> m_aaLF () embed :: forall m_aaLI. MonadFree EInstruction m_aaLI => [InstructionPos Text] -> m_aaLI () -- | Quasiquoter for embedding dockerfiles on the EDSL -- --
--   putStr $ toDockerfile $ do
--       from "node"
--       run "apt-get update"
--       [edockerfile|
--       RUN apt-get update
--       CMD node something.js
--       |]
--   
edockerfile :: QuasiQuoter -- | The type of Identity based EDSL blocks type EDockerfileM = Free EInstruction -- | The type of free monad EDSL blocks type EDockerfileTM = FreeT EInstruction data EBaseImage EBaseImage :: Image -> Maybe Tag -> Maybe Digest -> Maybe ImageAlias -> Maybe Platform -> EBaseImage dockerfile :: QuasiQuoter instructionPos :: Instruction args -> InstructionPos args