<@U04S8PLJWMT> You have removed `airbyte-ci` at th...
# replication-ask-ai
j
@kapa.ai You have removed
airbyte-ci
at the Airbyte source code level. After I modify the connector code, how should I build the Docker image?
k
Based on the knowledge sources, there are two main approaches to build a Docker image for a patched connector without `airbyte-ci`: Option 1: Dockerfile based on the existing connector image (recommended for patching) Create a
Dockerfile
in your connector directory based on the latest published image:
Copy code
FROM airbyte/source-<your-connector>:latest

COPY . ./airbyte/integration_code
RUN pip install ./airbyte/integration_code

# The entrypoint and default env vars are already set in the base image
# ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
Then build and test it:
Copy code
docker build -t airbyte/source-<your-connector>:dev .
# Verify it works
docker run airbyte/source-<your-connector>:dev spec
[Patching connector image] Option 2: Using airbyte-cdk image build (for JVM/Python connectors) The
airbyte-cdk
CLI provides a lighter alternative that uses the Dockerfiles in the
docker-images/
directory:
Copy code
cd airbyte-integrations/connectors/source-<your-connector>
airbyte-cdk image build
This automatically builds both
arm64
and
amd64
images. [Docker Images README] Option 3: Gradle (Java connectors only) For JVM-based connectors, use Gradle:
Copy code
./gradlew :airbyte-integrations:connectors:<connector-name>:assemble
[Docker Images README] Once built, you can push the image to your own registry with
docker tag
and
docker push
, then register it as a custom connector in the Airbyte UI under Settings → Sources/Destinations → Custom Connector. 👍 0 button 👎 0 button â„šī¸ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
j
@kapa.ai What if I modify the code of the Shopify source connector? How do I build the Docker image without
airbyte-ci
?
k
Based on the knowledge sources, the Shopify connector's documented build method uses
airbyte-ci
. However, the same Dockerfile-based patching approach that applies to other Python connectors works here too. Create a
Dockerfile
in the
source-shopify
directory:
Copy code
FROM airbyte/source-shopify:latest

COPY . ./airbyte/integration_code
RUN pip install ./airbyte/integration_code

# The entrypoint and default env vars are already set in the base image
# ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
Then build and verify the image:
Copy code
docker build -t airbyte/source-shopify:dev .
# Verify it works
docker run airbyte/source-shopify:dev spec
[Shopify README] To push to your own repository, retag and push:
Copy code
docker tag airbyte/source-shopify:dev your-repo/source-shopify:your-tag
docker push your-repo/source-shopify:your-tag
> Note: The Shopify connector's README only documents
airbyte-ci
as the official build method. The Dockerfile approach above is derived from the pattern used by other Python connectors and is noted as functional but not optimized. [Patching connector image] 👍 0 button 👎 0 button â„šī¸ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.