Upgrade to Stack-based build in Docker

[?]
Oct 21, 2016, 4:49 AM
2LZYVHFSGAHDZD4TKSSHUHYR3N6LJFDSWUV2SFVP3GXNT7Y43BNQC

Dependencies

  • [2] M3KUPGZK Add invitation email template.
  • [3] 4ZLEDBK7 Initial attempts at dockerizing, cabal isn't cooperating.
  • [4] 2XQD6KKK Add invitation logic and clean up DBProg error handling.
  • [5] JEOPOOPT Dockerfile now builds correctly.

Change contents

  • replacement in Dockerfile at line 2
    [3.84][3.84:120]()
    FROM phusion/baseimage:0.9.16
    [3.84]
    [3.120]
    FROM phusion/baseimage:0.9.19
  • replacement in Dockerfile at line 9
    [3.26][3.231:437](),[3.231][3.231:437](),[3.437][3.1:104](),[3.104][3.129:214](),[3.129][3.129:214](),[3.214][3.737:770](),[3.737][3.737:770](),[3.770][3.105:219]()
    RUN echo 'deb http://ppa.launchpad.net/hvr/ghc/ubuntu trusty main' > /etc/apt/sources.list.d/ghc.list && \
    apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F6F88286 && \
    apt-get update && \
    apt-get install -y --no-install-recommends cabal-install-1.22 ghc-7.10.2 happy-1.19.5 alex-3.1.4 \
    zlib1g-dev libtinfo-dev libsqlite3-0 libsqlite3-dev ca-certificates && \
    rm -rf /var/lib/apt/lists/*
    ENV PATH /root/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.10.2/bin:/opt/happy/1.19.5/bin:/opt/alex/3.1.4/bin:$PATH
    [3.26]
    [3.328]
    RUN echo 'deb http://download.fpcomplete.com/ubuntu xenial main' > /etc/apt/sources.list.d/fpco.list && \
    apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 575159689BEFB442
  • replacement in Dockerfile at line 14
    [3.407][3.407:753]()
    apt-get install -y --no-install-recommends wget && \
    echo 'deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main' > /etc/apt/sources.list.d/pgdg.list && \
    wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
    apt-get update && \
    apt-get install -y --no-install-recommends libpq-dev
    [3.407]
    [3.884]
    apt-get install -y --no-install-recommends libpq-dev stack
  • edit in Dockerfile at line 18
    [3.926]
    [2.48]
    ADD ./stack.yaml /opt/aftok/stack.yaml
    ADD ./lib /opt/aftok/lib
    ADD ./server /opt/aftok/server
    ADD ./test /opt/aftok/test
  • replacement in Dockerfile at line 23
    [2.67][3.926:943](),[3.926][3.926:943](),[3.943][2.68:136]()
    RUN cabal update
    RUN cabal install cpphs
    RUN cabal install --only-dependencies -j4
    [2.67]
    [3.1024]
    RUN stack setup
    RUN stack install cpphs
  • replacement in Dockerfile at line 28
    [3.913][2.137:254]()
    ADD ./lib /opt/aftok/lib
    ADD ./server /opt/aftok/server
    RUN cabal configure && cabal build aftok-server
    [3.913]
    [3.1081]
    RUN stack build