Supported tags and respective
What is Haskell?
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.
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
haddock provide advanced benchmarking, property-based testing, code coverage, and documentation generation.
About this image
This image ships a minimal Haskell toolchain with the following packages from the hvr PPA:
The most recent GHC release in the 7.8 series is also available, though no longer receiving updates from upstream, so users are encouraged to upgrade to 7.10.
How to use this image
Start an interactive interpreter session with
$ docker run -it --rm haskell:7.10 GHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help Prelude>
Dockerize a Hackage app with a Dockerfile inheriting from the base image:
FROM haskell:7.8 RUN cabal update && cabal install MazesOfMonad VOLUME /root/.MazesOfMonad ENTRYPOINT ["/root/.cabal/bin/mazesofmonad"]
Iteratively develop then ship a Haskell app with a Dockerfile utilizing the build cache:
FROM haskell:7.8 RUN cabal update # Add .cabal file ADD ./server/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 RUN cd /opt/server && cabal install --only-dependencies -j4 # Add and Install Application Code ADD ./server /opt/server RUN cd /opt/server && cabal install # Add installed cabal executables to PATH ENV PATH /root/.cabal/bin:$PATH # Default Command for Container WORKDIR /opt/server CMD ["snap-example"]
See the application snippet above in more detail in the example snap application.
Supported Docker versions
This image is officially supported on Docker version 1.6.2.
Support for older versions (down to 1.0) is provided on a best-effort basis.
Docker, Inc is the company behind the open source Docker platform and the growing Docker ecosystem of contributors, partners and adopters revolutionizing the way distributed applications are built, shipped, and run.
Copyright (c) 2014-2015 Docker, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.