Skip to content

Commit 6bd973d

Browse files
authored
Merge pull request #85 from AlistairB/add-docs
Add maintenance docs
2 parents 94c1696 + 00235fe commit 6bd973d

File tree

1 file changed

+102
-6
lines changed

1 file changed

+102
-6
lines changed

README.md

Lines changed: 102 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,111 @@
11
![image](https://github.com/haskell/docker-haskell/blob/master/logo.png?raw=true)
22

3+
| Build | Status | Badges | (per-arch) |
4+
|:-:|:-:|:-:|:-:|
5+
| [![amd64 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/amd64/job/haskell.svg?label=amd64)](https://doi-janky.infosiftr.net/job/multiarch/job/amd64/job/haskell/) | [![aarch64v8 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/aarch64v8/job/haskell.svg?label=aarch64v8)](https://doi-janky.infosiftr.net/job/multiarch/job/aarch64v8/job/haskell/) | [![put-shared build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/put-shared/job/light/job/haskell.svg?label=put-shared)](https://doi-janky.infosiftr.net/job/put-shared/job/light/job/haskell/) |
6+
37
---
48

5-
*This repository contains the `Dockerfile` source for the [`haskell`](https://hub.docker.com/r/library/haskell/) Official Repository on DockerHub.*
9+
# Haskell Docker Official Images
10+
11+
This is the Git repo of the [Docker "Official Image"](https://github.com/docker-library/official-images#what-are-official-images) for [`haskell`](https://hub.docker.com/_/haskell/). See [the Docker Hub page](https://hub.docker.com/_/haskell/) for the full readme on how to use this Docker image.
12+
13+
## Image Details
14+
15+
### Included Tools
16+
17+
* [Glasgow Haskell Compiler (GHC)](https://www.haskell.org/ghc/).
18+
* [Cabal](https://cabal.readthedocs.io/en/stable/) the CLI tool.
19+
* [Haskell Stack](https://docs.haskellstack.org/en/stable) the CLI tool.
20+
21+
### Operating System Support
22+
23+
| Operating System | Support | Supported Versions | Support Variants |
24+
|------------------|---------|--------------------|-------------------------------|
25+
| Debian | Yes | buster | standard, slim |
26+
| Alpine | [Planned](https://github.com/haskell/docker-haskell/issues/22) | Last 2 releases | N/A |
27+
| Windows | [Planned](https://github.com/haskell/docker-haskell/issues/3) | ltsc2022 | windowsservercore, nanoserver |
28+
29+
### Processor Architecture Support
30+
31+
* amd64
32+
* aarch64 ([does not include Stack](https://github.com/haskell/docker-haskell/issues/59))
33+
34+
### Installation Method
35+
36+
#### Cabal + Stack
37+
38+
Cabal and Stack release binaries for various platforms. These are downloaded and made available eg. copied into `/usr/local/bin`.
39+
40+
#### GHC
41+
42+
GHC releases an archive which includes scripts to install GHC. Once downloaded GHC is installed via:
43+
44+
* `./configure ` (we pass in additional paramters to the configure step)
45+
* `make install`
46+
47+
The installed binaries are made availabe on the `PATH`.
48+
49+
### Verification Method
50+
51+
Verification is done following the ['preferred' method for docker official images](https://github.com/docker-library/official-images#image-build). This means we:
52+
53+
* Verify the release is published by the expected person via PGP key verification.
54+
* Verify the sha256 of the release is as expected.
55+
56+
### Version Support Policy
57+
58+
#### GHC
59+
60+
GHC minor versions (eg. 9.2) that are either actively being maintained (new patch releases will come out) or are still popular will be supported by these images. Once both of these are no longer true, support can be dropped. Users can still pull these images, however they will not be listed on the docker hub page and will no longer be updated with new Cabal and Stack versions.
61+
62+
Additionally, only the latest patch version of each major version of GHC will recieve further updates.
63+
64+
#### Cabal + Stack
65+
66+
For actively supported GHC versions, Cabal and Stack should be updated when new versions are relesaed.
67+
68+
## Maintenance
69+
70+
### Building + Running Locally
71+
72+
You can build and run the images locally with something like:
73+
74+
```bash
75+
$ docker build -t haskell-local 9.2/buster && docker run -it haskell-local bash
76+
```
77+
78+
### Updating The Images
79+
80+
#### Update Dockerfiles
81+
82+
When a new version of Cabal, Stack or GHC is released the images need to be updated. This involves:
83+
84+
1. Update to the new version in the Dockerfile.
85+
2. Update the PGP key, if the person doing the release has changed.
86+
3. Updating the sha256 to the new version of the tool, for all supported processor architectures.
87+
4. For GHC: Updating the github actions to test the new version.
88+
89+
See an [example](https://github.com/haskell/docker-haskell/pull/83/files) of a GHC update.
90+
91+
#### Release New Versions
92+
93+
Images are built and released by the central docker official images system. Specifically haskell is maintained in this [file](https://github.com/docker-library/official-images/blob/master/library/haskell). See the [docs](https://github.com/docker-library/official-images#instruction-format) on this format.
94+
95+
1. Determine which docker haskell image GHC versions have been impacted by the unreleased changes.
96+
2. Update the `GitCommit` in the [`haskell`](https://github.com/docker-library/official-images/blob/master/library/haskell) file.
97+
3. Update the `Tags` if these have changed.
98+
3. Create a PR, including info on what has changed. The official images people will review the actual Dockerfile changes as they want official images to maintain a high level of quality.
99+
4. Once merged, their build system will run and the image updates will eventually be released.
100+
101+
This [doc](https://github.com/docker-library/faq#an-images-source-changed-in-git-now-what) described the process in more detail.
6102

7-
*The Documentation source is over in [docker-library/docs](https://github.com/docker-library/docs/tree/master/haskell).*
103+
### Image Tests
8104

9-
## Issues and Contributing
105+
#### Functionality Tests
10106

11-
If you have any problems with or questions about this image, please contact us through a [GitHub issue](%%GITHUB-REPO%%/issues).
107+
The [image tests](https://github.com/docker-library/official-images/tree/master/test/tests) live in the official-images repo. They are run against amd64 and aarch64 in this repo. When updating [`haskell`](https://github.com/docker-library/official-images/blob/master/library/haskell) in the official images repo they are only run against amd64.
12108

13-
You can also reach many of the official image maintainers via the `#docker-library` IRC channel on [Libera](https://libera.chat/).
109+
#### Dockerfile Linting
14110

15-
You are invited to contribute new features, fixes, or updates directly via pull requests on GitHub.
111+
This is done via [`hadolint`](https://github.com/hadolint/hadolint). We should not be afraid to ignore hadolint rules globally if required as it is not really designed for the official images which have some nuances.

0 commit comments

Comments
 (0)