Skip to content

Commit

Permalink
add brotli shared lib to packager image (hasura#2924)
Browse files Browse the repository at this point in the history
Add brotli library dependencies to the server docker image.

The compression feature introduced in hasura#2751 requires brotli shared libraries at runtime. In original PR, adding them to server packager image was missing.
  • Loading branch information
rakeshkky authored and polRk committed Feb 12, 2020
1 parent 59b2156 commit 64df044
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/Makefile
Expand Up @@ -6,7 +6,7 @@ nproc := $(shell nproc)

# TODO: needs to be replaced with something like yq
stack_resolver := $(shell awk '/^resolver:/ {print $$2;}' stack.yaml)
packager_ver := 20190731
packager_ver := 20190923
pg_dump_ver := 11
project_dir := $(shell pwd)
build_dir := $(project_dir)/$(shell stack path --dist-dir)/build
Expand Down
8 changes: 7 additions & 1 deletion server/packaging/packager.df
@@ -1,8 +1,14 @@
FROM hasura/haskell-docker-packager:20190731
MAINTAINER vamshi@hasura.io

RUN apt-get update && apt-get install -y libpq5 upx \
RUN apt-get update && apt-get install -y libpq5 upx git cmake pkgconf \
&& update-ca-certificates \
&& mkdir -p /usr/src/busybox/rootfs/etc/ssl/certs \
&& cp -L /etc/ssl/certs/* /usr/src/busybox/rootfs/etc/ssl/certs/ \
&& git clone https://github.com/google/brotli.git && cd brotli && mkdir out && cd out && ../configure-cmake \
&& make && make test && make install && ldconfig && cd ../../ \
&& rm -rf brotli \
&& cp /usr/local/lib/libbrotlienc.so.1 /usr/src/busybox/rootfs/usr/lib/x86_64-linux-gnu \
&& cp /usr/local/lib/libbrotlidec.so.1 /usr/src/busybox/rootfs/usr/lib/x86_64-linux-gnu \
&& cp /usr/local/lib/libbrotlicommon.so.1 /usr/src/busybox/rootfs/usr/lib/x86_64-linux-gnu \
&& rm -rf /var/lib/apt/lists/*

0 comments on commit 64df044

Please sign in to comment.