This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM haskell:8.2.2 AS fetch-source | |
ADD https://api.github.com/repos/bigsleep/ImagePacker/branches/master /repository-hash | |
RUN git clone --depth 1 -b master https://github.com/bigsleep/ImagePacker /source | |
FROM haskell:8.2.2 AS build | |
RUN printf "\npackage-indices:\n- name: Stackage\n download-prefix: https://www.stackage.org/lts-10.4/package/\n http: https://www.stackage.org/lts-10.4/00-index.tar.gz\n- name: HackageOrig\n download-prefix: https://hackage.haskell.org/package/\n http: https://hackage.haskell.org/00-index.tar.gz" >> ~/.stack/config.yaml | |
RUN stack update | |
RUN mkdir /work | |
COPY --from=fetch-source /source/ImagePacker.cabal /work/ | |
COPY --from=fetch-source /source/stack.yaml /work/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM haskell:8.2.2 | |
RUN stack --system-ghc --resolver lts-10.4 --local-bin-path /sbin install pandoc pandoc-citeproc --ghc-options '-fPIC' --flag pandoc:static --flag pandoc:embed_data_files | |
FROM alpine:latest | |
COPY --from=0 /sbin/pandoc /sbin/ | |
COPY --from=0 /sbin/pandoc-citeproc /sbin/ | |
ENTRYPOINT ["pandoc"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## created from https://github.com/freebroccolo/docker-haskell | |
## Dockerfile for a haskell environment | |
FROM debian:stretch | |
## ensure locale is set during build | |
ENV LANG C.UTF-8 | |
RUN apt-get update && apt-get install -y --no-install-recommends gnupg dirmngr && \ | |
echo 'deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main' > /etc/apt/sources.list.d/ghc.list && \ | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F6F88286 && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Codec.Picture | |
import Codec.Picture.Types | |
import Control.Monad.Primitive (PrimState) | |
main :: IO () | |
main = mapM_ (writeOneRectImage imageSize) [0..99] | |
where | |
imageSize = (100, 100) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
INDEX_PATH=index | |
PACKAGE_PATH=package | |
rm 00-index.tar.gz 2>/dev/null | |
rm -r $INDEX_PATH 2>/dev/null | |
mkdir $INDEX_PATH |