-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathDockerfile
41 lines (35 loc) · 1.6 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# (C) 2021 GoodData Corporation
FROM postgres:12.14-alpine
#
# Docker image that adds multicorn & gooddata-fdw on top of official PostgreSQL image.
#
# Note: multicorn has some issues building against PostgreSQL 13 so going with v12 for now
#
#
# There is also some funny stuff in the multicorn make file. Documented here:
#
# see: https://github.com/Segfault-Inc/Multicorn/issues/183
# see: https://gist.github.com/felixge/49c37dffb49efc8bc0911b1113231de0#file-dockerfile
#
# The preflight-check is removed because of this.
#
RUN apk add --no-cache --update wget make musl-dev llvm llvm-dev gcc clang python3 python3-dev py3-setuptools py3-pip \
&& pip3 --no-color --no-cache-dir -qq install pgxnclient \
\
&& pgxnclient install foreign_table_exposer \
\
&& wget http://api.pgxn.org/dist/multicorn/1.4.0/multicorn-1.4.0.zip && unzip multicorn-1.4.0 && cd multicorn-1.4.0 \
&& echo "" > preflight-check.sh && PYTHON_OVERRIDE=python3 make && PYTHON_OVERRIDE=python3 make install
#
# Add all required gooddata-python packages into the image
#
ADD gooddata-api-client /gd/gooddata-api-client
ADD gooddata-sdk /gd/gooddata-sdk
ADD gooddata-fdw /gd/gooddata-fdw
RUN cd /gd/gooddata-api-client && pip install . \
&& cd /gd/gooddata-sdk && pip install . \
&& cd /gd/gooddata-fdw && pip install .
# Add sql files to be executed during start of container
# They register extensions and install helping sql procedures
ADD gooddata-fdw/sql/create_extensions.sql /docker-entrypoint-initdb.d/create_extensions.sql
ADD gooddata-fdw/sql/import_gooddata.sql /docker-entrypoint-initdb.d/import_gooddata.sql