Code Monkey home page Code Monkey logo

docker-haskell's Introduction

image


This repository contains the source for the haskell Official Repository on DockerHub.

Haskell is a lazy, functional, statically-typed programming language with advanced type system features such as higher-rank, higher-kinded parametric polymorphism, monadic effects, generalized algebraic data types (GADTs), flexible type classes, associated type families, and more.

Haskell's ghc is a portable, optimizing compiler with a foreign-function interface (FFI), an LLVM backend, and sophisticated runtime support for concurrency, explicit/implicit parallelism, runtime profiling, etc. Other Haskell tools like criterion, quickcheck, hpc, and haddock provide advanced benchmarking, property-based testing, code coverage, and documentation generation.

A large number of production-quality Haskell libraries are available from Hackage in the form of Cabal packages. The traditional cabal tool, or the more recent stack tool (available in 7.10.3+) can be used to streamline working with Cabal packages. The key differences are summarized here. New users are encouraged to start with stack.

About this image

This image ships a minimal Haskell toolchain with the following packages from the hvr PPA:

  • ghc
  • alex
  • cabal-install
  • happy

As of 7.10.3, the stack tool is included via FPComplete's Debian repository.

Note: The GHC developers do not support legacy release branches (i.e. 7.8.x). While older GHC release tags are available in this DockerHub repository, only the latest stable release (or upcoming release candidates) will be shown in the "Supported tags ..." section at the top of the DockerHub repository page.

How to use this image

Start an interactive interpreter session with ghci:

$ docker run -it --rm haskell:7.10.3
GHCi, version 7.10.3: http://www.haskell.org/ghc/  :? for help
Prelude>

Dockerize an application from Hackage with a Dockerfile:

FROM haskell:7
RUN stack install pandoc pandoc-citeproc
ENTRYPOINT ["pandoc"]

Alternatively, using cabal:

FROM haskell:7
RUN cabal update && cabal install pandoc pandoc-citeproc
ENTRYPOINT ["pandoc"]

Iteratively develop a Haskell application with a Dockerfile utilizing the build cache. Note that cabal update will not run after the first build unless the --no-cache flag is used.

FROM haskell:7.10

WORKDIR /opt/server

RUN cabal update

# Add just the .cabal file to capture dependencies
COPY ./snap-example.cabal /opt/server/snap-example.cabal

# Docker will cache this command as a layer, freeing us up to
# modify source code without re-installing dependencies
# (unless the .cabal file changes!)
RUN cabal install --only-dependencies -j4

# Add and Install Application Code
COPY . /opt/server
RUN cabal install

CMD ["snap-example"]

Examples

See the application snippet above in more detail in the example snap application.

Issues and Contributing

If you have any problems with or questions about this image, please contact us through a GitHub issue.

You can also reach many of the official image maintainers via the #docker-library IRC channel on Freenode.

You are invited to contribute new features, fixes, or updates directly via pull requests on GitHub.

docker-haskell's People

Contributors

annetheagile avatar christopherbiscardi avatar darinmorrison avatar mfine avatar nightscape avatar psftw avatar tianon avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.