forked from airbytehq/airbyte
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Revert "Bmoric/remove docker compose for build (airbytehq#7500)…
…" (airbytehq#7698)" (airbytehq#7746) This reverts commit 797d11a. Restore the removal of the docker compose file
- Loading branch information
1 parent
6f12778
commit 42b378f
Showing
31 changed files
with
196 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
plugins { | ||
id "airbyte-docker" | ||
} | ||
Task dockerBuildTask = getDockerBuildTask("cli", "$project.projectDir") | ||
dockerBuildTask.dependsOn(copyDocker) | ||
assemble.dependsOn(dockerBuildTask) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
FROM postgres:13-alpine | ||
|
||
COPY src/main/resources/init.sql /docker-entrypoint-initdb.d/000_init.sql | ||
COPY bin/init.sql /docker-entrypoint-initdb.d/000_init.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Developing on docker | ||
|
||
## Incrementality | ||
|
||
The docker build is fully incremental for the platform build, which means that it will only build an image if it is needed. We need to keep it that | ||
way. | ||
A task generator, `getDockerBuildTask`, is available for building a docker image for any given module. Behind the scene, it will generate a | ||
task which will run the build of a docker image in a specific folder. The goal is to make sure that we have an isolated | ||
context which helps with incrementality. All files that need to be present in the docker image will need to be copy into this folder. The generate | ||
method takes 2 arguments: | ||
- The image name, for example if `foo` is given as an image name, the image `airbyte/foo` will be created | ||
- The project directory folder. It is needed because the `getDockerBuildTask` is declared in the rootProject | ||
|
||
## Adding a new docker build | ||
|
||
Once you have a `Dockerfile`, generating the docker image is done in the following way: | ||
- specify the artifact name and the project directory, | ||
- make sure that the Dockerfile is properly copied to the docker context dir before building the image | ||
- make the build docker task to depend on the `assemble` task. | ||
|
||
For example: | ||
```groovy | ||
Task dockerBuildTask = getDockerBuildTask("cli", project.projectDir) | ||
dockerBuildTask.dependsOn(copyDocker) | ||
assemble.dependsOn(dockerBuildTask) | ||
``` | ||
|
||
If you need to add files in your image you need to copy them in `build/docker/bin` first. The need to happen after the `copyDocker` task. | ||
The `copyDocker` task clean up the `build/docker` folder as a first step. | ||
|
||
For example: | ||
```groovy | ||
task copyScripts(type: Copy) { | ||
dependsOn copyDocker | ||
from('scripts') | ||
into 'build/docker/bin/scripts' | ||
} | ||
Task dockerBuildTask = getDockerBuildTask("init", project.projectDir) | ||
dockerBuildTask.dependsOn(copyScripts) | ||
assemble.dependsOn(dockerBuildTask) | ||
``` |
Oops, something went wrong.