From ae7bf6f3cc5c547f63ed289e1b68427edb5871ad Mon Sep 17 00:00:00 2001
From: maxi297 <maxime@airbyte.io>
Date: Thu, 22 Dec 2022 10:22:38 -0500
Subject: [PATCH] [local airbyte cdk tests] update README.md to fix gradle
 command and support more docker images

---
 airbyte-cdk/python/README.md | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/airbyte-cdk/python/README.md b/airbyte-cdk/python/README.md
index a660ef8dba85..8d2efe10afb7 100644
--- a/airbyte-cdk/python/README.md
+++ b/airbyte-cdk/python/README.md
@@ -112,7 +112,13 @@ Create a symlink that connects `<connector-directory>/airbyte-cdk` to your local
 ln -s ../../../airbyte-cdk/python airbyte-cdk
 ```
 
-Add the following lines to your connector's `Dockerfile`, before the line that installs dependencies via `pip install -e .`:
+Now that you have a symbolic link in your source, you will nedd to install it in the docker image. Depending on how the docker image is build you will have two possibilities:
+1. If image building process uses a temporary image called `builder`, add the following just after the copy of the installed packages to the folder `/usr/local`: 
+```Dockerfile
+COPY airbyte-cdk airbyte-cdk
+RUN PYTHONUSERBASE=/usr/local pip install -e ./airbyte-cdk
+```
+2. Add the following lines to your connector's `Dockerfile`, before the line that installs dependencies via `pip install -e .`:
 ```Dockerfile
 COPY airbyte-cdk airbyte-cdk
 RUN pip install -e ./airbyte-cdk
@@ -128,7 +134,7 @@ airbyteDocker {
 You should be able to build your connector with
 ```bash
 # from the airbytehq/airbyte base directory
-./gradlew build :airbyte-integrations:connectors:<connector-directory>
+./gradlew :airbyte-integrations:connectors:<connector-directory>:airbyteDocker
 ```
 and the installation should use your local CDK. Note that the local CDK is injected at build time, so if you make changes, you will have to run the build command again to see them reflected.
 **Note:** if your connector uses a `.dockerignore` file, it cannot have `exclude-all` or `exclude-except` patterns, i.e. the `.dockerignore` must specifically say which files to ignore without using any regex.