-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
148 lines (120 loc) · 4.69 KB
/
Dockerfile
File metadata and controls
148 lines (120 loc) · 4.69 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
FROM postgres:16-bullseye
ENV POSTGIS_MAJOR 3
MAINTAINER Andrea Minetti (andrea.minetti@wsl.ch)
# ENV PLV8_VERSION=3.0.0
# RUN apt-get -y update
# RUN apt-get -y install postgresql-server-dev-13
# RUN apt-get -y install python python2
# RUN apt-get -y install gcc make g++
# RUN apt-get -y install pkg-config
# RUN apt-get -y install libc++-dev
# RUN apt-get -y install libc++abi-dev
# RUN apt-get -y install libglib2.0-dev
# RUN apt-get -y install libtinfo5
# RUN apt-get -y install curl git \
# && mkdir -p /plv8build \
# && cd plv8build \
# && curl -o plv8.tar.gz -L https://github.com/plv8/plv8/archive/v${PLV8_VERSION}.tar.gz \
# && tar -xvzf plv8.tar.gz \
# && cd plv8-${PLV8_VERSION} && make && make install \
# && rm -rf /plv8build \
# && rm -rf /var/lib/apt/lists/*
# RUN apt-get -y autoremove && apt-get clean
ENV PG_LIB=postgresql-server-dev-${PG_MAJOR}
ENV PG_BRANCH=REL_${PG_MAJOR}_STABLE
ENV PLUGIN_BRANCH=print-vars-${PG_MAJOR}
RUN apt-get update \
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
&& apt-get install -y --no-install-recommends \
git python3 \
python3-pip \
postgresql-plpython3-$PG_MAJOR \
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \
build-essential \
libreadline-dev \
zlib1g-dev \
icu-devtools \
libicu-dev \
pkg-config \
clang-13 \
llvm-13 \
bison \
libkrb5-dev \
flex \
$PG_LIB \
&& rm -rf /var/lib/apt/lists/*
# POSTGRES SOURCE
RUN cd /usr/src/ \
&& git clone https://github.com/postgres/postgres.git \
&& cd postgres \
&& git checkout $PG_BRANCH \
&& ./configure
RUN cd /usr/src/postgres/contrib \
&& git clone https://github.com/vibhorkum/pg_background.git \
&& cd pg_background \
&& make \
&& make install
# CLEANUP
RUN rm -r /usr/src/postgres \
&& apt --yes remove --purge \
git build-essential \
libreadline-dev \
zlib1g-dev bison \
libkrb5-dev flex \
$PG_PG_LIB \
&& apt --yes autoremove \
&& apt --yes clean
# Python modules
RUN pip3 install requests
# Oracle FDW
# Latest version
ARG ORACLE_CLIENT_URL=https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip
#ARG ORACLE_SQLPLUS_URL=https://download.oracle.com/otn_software/linux/instantclient/instantclient-sqlplus-linuxx64.zip
ARG ORACLE_SDK_URL=https://download.oracle.com/otn_software/linux/instantclient/instantclient-sdk-linuxx64.zip
# Version specific setup
#ARG ORACLE_CLIENT_VERSION=18.5.0.0.0
#ARG ORACLE_CLIENT_PATH=185000
#ARG ORACLE_CLIENT_VERSION=19.8.0.0.0
#ARG ORACLE_CLIENT_PATH=19800
#ARG ORACLE_CLIENT_URL=https://download.oracle.com/otn_software/linux/instantclient/${ORACLE_CLIENT_PATH}/instantclient-basic-linux.x64-${ORACLE_CLIENT_VERSION}dbru.zip
#ARG ORACLE_SQLPLUS_URL=https://download.oracle.com/otn_software/linux/instantclient/${ORACLE_CLIENT_PATH}/instantclient-sqlplus-linux.x64-${ORACLE_CLIENT_VERSION}dbru.zip
#ARG ORACLE_SDK_URL=https://download.oracle.com/otn_software/linux/instantclient/${ORACLE_CLIENT_PATH}/instantclient-sdk-linux.x64-${ORACLE_CLIENT_VERSION}dbru.zip
ENV ORACLE_HOME=/usr/lib/oracle/client
RUN apt-get update; \
apt-get install -y --no-install-recommends ca-certificates wget unzip; \
# instant client
wget -O instant_client.zip ${ORACLE_CLIENT_URL}; \
unzip instant_client.zip; \
# sqlplus
#wget -O sqlplus.zip ${ORACLE_SQLPLUS_URL}; \
#unzip sqlplus.zip; \
# sdk
wget -O sdk.zip ${ORACLE_SDK_URL}; \
unzip sdk.zip; \
# install
mkdir -p ${ORACLE_HOME}; \
mv instantclient*/* ${ORACLE_HOME}; \
rm -r instantclient*; \
rm instant_client.zip sdk.zip; \
#rm instant_client.zip sqlplus.zip sdk.zip; \
# required runtime libs: libaio
apt-get install -y --no-install-recommends libaio1; \
apt-get purge -y --auto-remove
ENV PATH $PATH:${ORACLE_HOME}
ARG ORACLE_FDW_VERSION=2_6_0
ARG ORACLE_FDW_URL=https://github.com/laurenz/oracle_fdw/archive/ORACLE_FDW_${ORACLE_FDW_VERSION}.tar.gz
ARG SOURCE_FILES=tmp/oracle_fdw
# oracle_fdw
RUN mkdir -p ${SOURCE_FILES}; \
wget -O - ${ORACLE_FDW_URL} | tar -zx --strip-components=1 -C ${SOURCE_FILES}; \
cd ${SOURCE_FILES}; \
# install
apt-get install -y --no-install-recommends make gcc; \
make; \
make install; \
echo ${ORACLE_HOME} > /etc/ld.so.conf.d/oracle_instantclient.conf; \
ldconfig; \
# cleanup
apt-get purge -y --auto-remove gcc make
RUN wget https://cdn.proj.org/ch_swisstopo_CHENyx06a.tif -P /usr/share/proj