Skip to content

Commit 0f39d6d

Browse files
committed
Flesh out the README and add a logo
1 parent cab3345 commit 0f39d6d

File tree

3 files changed

+62
-11
lines changed

3 files changed

+62
-11
lines changed

README-short.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
This image ships a minimal Haskell (GHC) toolchain consisting of alex, cabal, ghc, and happy. Suitable for providing a Haskell development environment or for deploying projects using Cabal/Hackage.
1+
Haskell is an advanced purely-functional programming language. This image contains a minimal Haskell (GHC) toolchain consisting of alex, cabal, ghc, and happy.

README.md

+61-10
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
1-
## Synopsis
1+
## What is Haskell?
22

3-
This docker image ships a minimal Haskell toolchain.
3+
![image](https://github.com/darinmorrison/docker-haskell/blob/docker-library/logo.png?raw=true)
44

5-
### Use Cases
5+
Haskell is an advanced purely-functional programming language. An open-source
6+
product of more than twenty years of cutting-edge research, it allows rapid
7+
development of robust, concise, correct software. With strong support for
8+
integration with other languages, built-in concurrency and parallelism,
9+
debuggers, profilers, rich libraries and an active community, Haskell makes it
10+
easier to produce flexible, maintainable, high-quality software.
611

7-
This image can be used in the following ways:
12+
The Glorious Glasgow Haskell Compilation System (GHC) is a state-of-the-art,
13+
open source, compiler and interactive environment for the functional language
14+
Haskell. GHC includes an optimising compiler (`ghc`), an interactive
15+
environment (`ghci`), and a convenient script runner (`runghc`).
816

9-
* **As a containerized Haskell development environment**
17+
> [haskell.org](http://www.haskell.org)
1018
11-
* **As a container in which to build and run Haskell apps locally or deploy remotely**
12-
13-
* **As a base image for other containers depending on the Haskell toolchain**
14-
15-
### Contents
19+
> [Glasgow Haskell Compiler](http://www.haskell.org/ghc)
1620
1721
The default configuration of this image provides the following packages:
1822

@@ -22,3 +26,50 @@ The default configuration of this image provides the following packages:
2226
| `cabal-install` | `1.20.0.3` |
2327
| `happy` | `1.19.4` |
2428
| `ghc` | `7.8.3` |
29+
30+
## How to use this image
31+
32+
Directly run `ghci`.
33+
34+
$ docker run -it --rm haskell:7.8
35+
GHCi, version 7.8.3: http://www.haskell.org/ghc/ :? for help
36+
Loading package ghc-prim ... linking ... done.
37+
Loading package integer-gmp ... linking ... done.
38+
Loading package base ... linking ... done.
39+
Prelude>
40+
41+
Dockerize an application on Hackage with a Dockerfile that inherits from the
42+
base image.
43+
44+
FROM haskell:7.8
45+
RUN cabal update && cabal install MazesOfMonad
46+
VOLUME /root/.MazesOfMonad
47+
ENTRYPOINT ["/root/.cabal/bin/mazesofmonad"]
48+
49+
Develop and ship your Haskell application with a Dockerfile that utilizes the
50+
build cache for quick iteration.
51+
52+
FROM haskell:7.8
53+
54+
RUN cabal update
55+
56+
# Add .cabal file
57+
ADD ./server/snap-example.cabal /opt/server/snap-example.cabal
58+
59+
# Docker will cache this command as a layer, freeing us up to
60+
# modify source code without re-installing dependencies
61+
RUN cd /opt/server && cabal install --only-dependencies -j4
62+
63+
# Add and Install Application Code
64+
ADD ./server /opt/server
65+
RUN cd /opt/server && cabal install
66+
67+
# Add installed cabal executables to PATH
68+
ENV PATH /root/.cabal/bin:$PATH
69+
70+
# Default Command for Container
71+
WORKDIR /opt/server
72+
CMD ["snap-example"]
73+
74+
This example can be reviewed in more depth at
75+
https://github.com/darinmorrison/docker-haskell/tree/docker-library/examples/7.8.3/snap

logo.png

6.89 KB
Loading

0 commit comments

Comments
 (0)