language-dockerfile alternatives and similar packages
Based on the "Development" category.
Alternatively, view language-dockerfile alternatives based on common mentions on social networks and blogs.
-
ShellCheck
ShellCheck, a static analysis tool for shell scripts -
hadolint
Dockerfile linter, validate inline bash, written in Haskell -
fay-base
A proper subset of Haskell that compiles to JavaScript -
criterion
A powerful but simple library for measuring the performance of Haskell code. -
retrie
Retrie is a powerful, easy-to-use codemodding tool for Haskell. -
structured-haskell-mode
Structured editing minor mode for Haskell in Emacs -
haskell-lsp
Haskell library for the Microsoft Language Server Protocol -
cabal-install-parsers
Scripts and instructions for using CI services (e.g. Travis CI or Appveyor) with multiple GHC configurations -
stgi
A user-centric visual STG implementation to help understand GHC/Haskell's execution model. -
inline-c
Write Haskell source files including C code inline. No FFI required. -
fourmolu
A fourk of ormolu that uses four space indentation and allows arbitrary configuration. Don't like it? PRs welcome! -
gi-atk
Generate Haskell bindings for GObject-Introspection capable libraries -
c2hs
c2hs is a pre-processor for Haskell FFI bindings to C libraries -
inline-java
Haskell/Java interop via inline Java code in Haskell modules. -
lambdabot
A friendly IRC bot and apprentice coder, written in Haskell. -
hie-bios
Set up a GHC API session for various Haskell Projects -
scion
OLD, DEPRECATED: Use this instead https://github.com/haskell/haskell-ide-engine -
lambdabot-core
A friendly IRC bot and apprentice coder, written in Haskell. -
gtk2hs-buildtools
GUI library for Haskell based on GTK+ -
threadscope
A graphical tool for profiling parallel Haskell programs
Learn any GitHub repo in 59 seconds
Do you think we are missing an alternative of language-dockerfile or a related project?
README
haskell-language-dockerfile
Dockerfile linter, parser, pretty-printer and embedded DSL, forked from hadolint.
Published on Hackage as language-dockerfile.
It extends hadolint with the pretty-printer and EDSL for writting Dockerfiles in Haskell.
- Parsing files
- Parsing strings
- Pretty-printing files
- Writing Dockerfiles in Haskell
- Using the QuasiQuoter
- Templating Dockerfiles in Haskell
- Using IO in the DSL
Parsing files
import Language.Dockerfile
main = do
ef <- parseFile "./Dockerfile"
print ef
Parsing strings
import Language.Dockerfile
main = do
c <- readFile "./Dockerfile"
print (parseString c)
Pretty-printing files
import Language.Dockerfile
main = do
Right d <- parseFile "./Dockerfile"
putStr (prettyPrint d)
Writing Dockerfiles in Haskell
{-# LANGUAGE OverloadedStrings #-}
import Language.Dockerfile
main = putStr $ toDockerfileStr $ do
from "node"
run "apt-get update"
runArgs ["apt-get", "install", "something"]
-- ...
Using the QuasiQuoter
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
import Language.Dockerfile
main = putStr $ toDockerfileStr $ do
from "node"
run "apt-get update"
[edockerfile|
RUN apt-get update
CMD node something.js
|]
-- ...
Templating Dockerfiles in Haskell
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
import Control.Monad
import Language.Dockerfile
tags = ["7.8", "7.10", "8"]
cabalSandboxBuild packageName = do
let cabalFile = packageName ++ ".cabal"
run "cabal sandbox init"
run "cabal update"
add cabalFile ("/app/" ++ cabalFile)
run "cabal install --only-dep -j"
add "." "/app/"
run "cabal build"
main =
forM_ tags $ \tag -> do
let df = toDockerfileStr $ do
from ("haskell" `tagged` tag)
cabalSandboxBuild "mypackage"
writeFile ("./examples/templating-" ++ tag ++ ".dockerfile") df
Using IO in the DSL
By default the DSL runs in the Identity
monad. By running in IO we can
support more features like file globbing:
{-# LANGUAGE OverloadedStrings #-}
import Language.Dockerfile
import qualified System.Directory as Directory
import qualified System.FilePath as FilePath
import qualified System.FilePath.Glob as Glob
main = do
str <- toDockerfileStrIO $ do
fs <- liftIO $ do
cwd <- Directory.getCurrentDirectory
fs <- Glob.glob "./test/*.hs"
return (map (FilePath.makeRelative cwd) fs)
from "ubuntu"
mapM_ (\f -> add f ("/app/" ++ FilePath.takeFileName f)) fs
putStr str
License
GPLv3
*Note that all licence references and agreements mentioned in the language-dockerfile README section above
are relevant to that project's source code only.