From 583e259533a39bd8a380c61f3af1e5d98a0fd68c Mon Sep 17 00:00:00 2001 From: Max Krieger Date: Wed, 26 Jun 2019 19:19:47 -0400 Subject: [PATCH] Temporary production image that includes necessary packages (#247) * [docker-compression] Attempt to make docker image smaller * [docker-compression] Add specificity to the circleci LTS version * [docker-compression] Changes base image for development container for consistency * [docker-compression] Forgot to make circleci build container consistent with the rest of the small ones * [docker-compression] Revert to stack-build from stack-build-small for build containers. Keep for production * [static-linkage] Build a static binary; make prod even more lightweight * [static-linkage] Attempt other static command * [static-linkage] Trying config-based static build * [static-linkage] Attempt a lot of deps to cover dynamic linkages * [static-linkage] Temporary static package definitions work * [static-linkage] Remove additional extra packages --- .circleci/config.yml | 2 +- Dockerfile.circleci | 50 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 086f064016..835cc180e7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -25,7 +25,7 @@ jobs: command: stack test - run: name: Install executable - command: stack install + command: stack install - save_cache: name: Cache Dependencies key: penrose-cache-{{ checksum "penrose.cabal" }} diff --git a/Dockerfile.circleci b/Dockerfile.circleci index 68d1b75f4b..a797a769fd 100644 --- a/Dockerfile.circleci +++ b/Dockerfile.circleci @@ -1,4 +1,52 @@ -FROM fpco/stack-build-small:lts-13.24 +FROM ubuntu:16.04 +# Based on https://raw.githubusercontent.com/fpco/stackage/9f2b7ab95c711794257b059604e80ab9ad3c0c45/debian-bootstrap.sh +RUN apt-get update +RUN echo "deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main" >>/etc/apt/sources.list && \ + echo "deb-src http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main" >>/etc/apt/sources.list + +RUN apt-get clean && apt-get install -y \ + git \ + libblas-dev \ + libbz2-dev \ + libcairo2-dev \ + libclang-3.9-dev \ + libcurl4-openssl-dev \ + libcwiid-dev \ + libdevil-dev \ + libfftw3-dev \ + libgd2-xpm-dev \ + libgeoip-dev \ + libgirepository1.0-dev \ + libglfw3-dev \ + libglib2.0-dev \ + libglu1-mesa-dev \ + libgnutls-dev \ + libgsasl7-dev \ + libicu-dev \ + libimlib2-dev \ + libjudy-dev \ + liblapack-dev \ + liblmdb-dev \ + liblzma-dev \ + libncurses-dev \ + libnfc-dev \ + liboath-dev \ + libopenal-dev \ + libopenmpi-dev \ + libpango1.0-dev \ + libre2-dev \ + librocksdb-dev \ + libsnappy-dev \ + libssl-dev \ + libsystemd-dev \ + libtagc0-dev \ + libtre-dev \ + libudev-dev \ + libvte-2.91-dev \ + libxau-dev \ + libxml2-dev \ + z3 \ + zlib1g-dev RUN mkdir -p /opt/penrose COPY . /opt/penrose/