Skip to content

Commit

Permalink
[AP-XXXX] Add docker build-arg to control which connectors are being …
Browse files Browse the repository at this point in the history
…added to the image (#532)
  • Loading branch information
amigold authored Sep 25, 2020
1 parent 3021e1b commit 04d45c4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@ RUN apt-get -qq update && apt-get -qqy install \
libaio1 \
mongo-tools \
mbuffer \
wget \
&& pip install --upgrade pip

# Oracle Instant Clinet for tap-oracle
ADD https://download.oracle.com/otn_software/linux/instantclient/193000/oracle-instantclient19.3-basiclite-19.3.0.0.0-1.x86_64.rpm /app/oracle-instantclient.rpm
RUN alien -i /app/oracle-instantclient.rpm --scripts && rm -rf /app/oracle-instantclient.rpm
ARG connectors=all

# Install Oracle Instant Client for tap-oracle if its in the connectors list
RUN 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"


COPY . /app

RUN cd /app \
&& ./install.sh --connectors=all --acceptlicenses --nousage --notestextras \
&& ./install.sh --connectors=$connectors --acceptlicenses --nousage --notestextras \
&& ln -s /root/.pipelinewise /app/.pipelinewise

ENTRYPOINT ["/app/entrypoint.sh"]
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@ consumes data from taps and do something with it, like load it into a file, API

If you have [Docker](https://www.docker.com/) installed then using docker is the recommended and easiest method to start using PipelineWise.

1. Build an executable docker image that has every required dependency and is isolated from your host system:
1. Build an executable docker image that has every required dependency and is isolated from your host system.

By default, the image will build with *all* connectors. In order to keep image size small, we strongly recommend you change it to just the connectors you need by supplying the `--build-arg` command:

```sh
$ docker build -t pipelinewise:latest .
$ docker build --build-arg connectors=tap-mysql,target-snowflake -t pipelinewise:latest .
```

2. Once the image is ready, create an alias to the docker wrapper script:
Expand Down

0 comments on commit 04d45c4

Please sign in to comment.