-
Notifications
You must be signed in to change notification settings - Fork 122
/
Dockerfile
44 lines (36 loc) · 1.94 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
42
43
44
FROM python:3.10-slim-buster
ARG connectors=all
RUN apt-get -qq update \
&& apt-get -qqy --no-install-recommends install \
apt-utils \
alien \
gnupg \
libaio1 \
mbuffer \
wget \
tzdata \
&& rm -rf /var/lib/apt/lists/* \
&& pip install -U --no-cache-dir pip
# Add Mongodb ppa
RUN wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add - \
&& echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.4 multiverse" | tee /etc/apt/sources.list.d/mongodb.list \
&& apt-get -qq update \
&& apt-get -qqy --no-install-recommends install \
mongodb-database-tools \
&& rm -rf /var/lib/apt/lists/*
COPY singer-connectors/ /app/singer-connectors/
COPY Makefile /app
RUN echo "setup connectors" \
# Install Oracle Instant Client for tap-oracle if its in the connectors list
&& bash -c "if grep -q \"tap-oracle\" <<< \"$connectors\"; then wget https://download.oracle.com/otn_software/linux/instantclient/193000/oracle-instantclient19.3-basiclite-19.3.0.0.0-1.x86_64.rpm -O /app/oracle-instantclient.rpm && alien -i /app/oracle-instantclient.rpm --scripts && rm -rf /app/oracle-instantclient.rpm ; fi" \
&& cd /app \
&& if [ "$connectors" = "all" ]; then make all_connectors -e pw_acceptlicenses=y; fi\
&& if [ "$connectors" = "default" ]; then make default_connectors -e pw_acceptlicenses=y; fi\
&& if [ "$connectors" = "extra" ]; then make extra_connectors -e pw_acceptlicenses=y; fi\
&& if [ "$connectors" != "all" ] && [ "$connectors" != "extra" ] && [ "$connectors" != "default" ] && [ "$connectors" != "none" ] && [ ! -z $connectors ]; then make connectors -e pw_connector=$connectors -e pw_acceptlicenses=y; fi
COPY . /app
RUN echo "setup pipelinewise" \
&& cd /app \
&& make pipelinewise_no_test_extras -e pw_acceptlicenses=y\
&& ln -s /root/.pipelinewise /app/.pipelinewise
ENTRYPOINT ["/app/entrypoint.sh"]