Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phadej/docker-stackage
Docker image with stackage config
https://github.com/phadej/docker-stackage
Last synced: about 5 hours ago
JSON representation
Docker image with stackage config
- Host: GitHub
- URL: https://github.com/phadej/docker-stackage
- Owner: phadej
- Created: 2015-02-13T14:17:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-05-19T10:15:09.000Z (over 9 years ago)
- Last Synced: 2024-10-11T23:53:32.597Z (26 days ago)
- Language: Haskell
- Size: 176 KB
- Stars: 5
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Haskell Stackage Docker image
This image is usable for building docker images with Haskell binaries.
Using double image trick, we build the binary using this image, but package into another.
Create `build.sh`:
```sh
#!/bin/sh
set -exu
cd /build
rm -rf .cabal-sandbox .cabal.sanbox.config
cabal clean
rm -f cabal.config # stackage image has global constraints
cabal install --only-dependencies
cabal configure
cabal build
chmod -R a+rw dist # we build as root, have to make everything rw
```and `Dockerfile`
```
FROM snoyberg/haskell-scratch
COPY dist/build/yourapp/yourapp /yourcompany/yourapp
ENTRYPOINT [ "/yourcompany/yourapp" ]
```Then we can create an image without build dependencies:
```
docker run --rm=true -v $(pwd):/build phadej/stackage:2.9 sh /build/build.sh # build binary
docker build . # build image
```--
This image contains some packages already compiled (my subjective picks)