From b7fc2c239d99203b206c4cd549914bd3a94e780d Mon Sep 17 00:00:00 2001 From: Hollin Wilkins Date: Fri, 27 Oct 2017 11:15:48 -0700 Subject: [PATCH] Update Dockerfile to build with correct version of Haskell. Summary: With the current Dockerfile, I get errors when trying to build: ``` Downloading lts-8.8 build plan ... Downloaded lts-8.8 build plan. Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpcomplete.com/) ... Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/ Downloading root Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/ Downloading timestamp Downloading snapshot Downloading mirrors Cannot update index (no local copy) Downloading index Updated package list downloaded Populating index cache ... Populated index cache. Compiler version mismatched, found ghc-8.2.1 (x86_64), but expected minor version match with ghc-8.0.2 (x86_64) (based on resolver setting in /duckling/stack.yaml). To install the correct GHC into /root/.stack/programs/x86_64-linux/, try running "stack setup" or use the "--install-ghc" flag. The command '/bin/sh -c stack build' returned a non-zero code: 1 ``` With these fixes, I run `stack setup` inside the docker image in case it was not setup previously on the host machine. Closes https://github.com/facebookincubator/duckling/pull/98 Differential Revision: D6174261 Pulled By: patapizza fbshipit-source-id: 4719d94 --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2743015f..9c73c47f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,9 @@ WORKDIR /duckling RUN apt-get update -RUN apt-get install libpcre3 libpcre3-dev +RUN apt-get install -qq -y libpcre3 libpcre3-dev build-essential --fix-missing --no-install-recommends + +RUN stack setup RUN stack build