Skip to content

Commit

Permalink
fixup slim build
Browse files Browse the repository at this point in the history
  • Loading branch information
david-leifker committed Aug 12, 2023
1 parent 88643c3 commit 4908544
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion datahub-frontend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ tasks.getByName("docker").dependsOn(unversionZip)

task cleanLocalDockerImages {
doLast {
rootProject.ext.cleanLocalDockerImages(docker_registry, docker_repo, "${version}".toString())
rootProject.ext.cleanLocalDockerImages(docker_registry, docker_repo, "${version}")
}
}
dockerClean.finalizedBy(cleanLocalDockerImages)
2 changes: 1 addition & 1 deletion datahub-upgrade/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ tasks.getByName("docker").dependsOn([bootJar])

task cleanLocalDockerImages {
doLast {
rootProject.ext.cleanLocalDockerImages(docker_registry, docker_repo, "${version}".toString())
rootProject.ext.cleanLocalDockerImages(docker_registry, docker_repo, "${version}")
}
}
dockerClean.finalizedBy(cleanLocalDockerImages)
Expand Down
2 changes: 1 addition & 1 deletion docker/datahub-ingestion-base/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dockerClean.dependsOn([':docker:datahub-ingestion:dockerClean'])

task cleanLocalDockerImages {
doLast {
rootProject.ext.cleanLocalDockerImages(docker_registry, docker_repo, "${version}-slim")
rootProject.ext.cleanLocalDockerImages(docker_registry, docker_repo, "${version}")
}
}
dockerClean.finalizedBy(cleanLocalDockerImages)
3 changes: 3 additions & 0 deletions docker/datahub-ingestion/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ ARG BASE_IMAGE=acryldata/datahub-ingestion-base
ARG DOCKER_VERSION=latest

FROM $BASE_IMAGE:$DOCKER_VERSION as base
USER 0

COPY ./metadata-ingestion /datahub-ingestion

Expand All @@ -13,6 +14,8 @@ RUN sed -i.bak "s/__version__ = \"0.0.0.dev0\"/__version__ = \"$RELEASE_VERSION\
cat src/datahub/__init__.py && \
chown -R datahub /datahub-ingestion

USER datahub

FROM base as slim-install
RUN pip install --no-cache --user ".[base,datahub-rest,datahub-kafka,snowflake,bigquery,redshift,mysql,postgres,hive,clickhouse,glue,dbt,looker,lookml,tableau,powerbi,superset,datahub-business-glossary]"

Expand Down
4 changes: 2 additions & 2 deletions docker/datahub-ingestion/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ docker {
i.file == project(':metadata-ingestion').buildDir
}
buildArgs([DOCKER_VERSION: version,
RELEASE_VERSION: version.replace('-SNAPSHOT', '').replace('v', ''),
RELEASE_VERSION: version.replace('-SNAPSHOT', '').replace('v', '').replace('-slim', ''),
APP_ENV: 'slim'])
}
tasks.getByName('docker').dependsOn(['build',
Expand All @@ -45,7 +45,7 @@ dockerClean.finalizedBy(mkdirBuildDocker)

task cleanLocalDockerImages {
doLast {
rootProject.ext.cleanLocalDockerImages(docker_registry, docker_repo, "${version}-slim")
rootProject.ext.cleanLocalDockerImages(docker_registry, docker_repo, "${version}")
}
}
dockerClean.finalizedBy(cleanLocalDockerImages)
2 changes: 1 addition & 1 deletion docker/elasticsearch-setup/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dockerClean.finalizedBy(mkdirBuildDocker)

task cleanLocalDockerImages {
doLast {
rootProject.ext.cleanLocalDockerImages(docker_registry, docker_repo, "${version}".toString())
rootProject.ext.cleanLocalDockerImages(docker_registry, docker_repo, "${version}")
}
}
dockerClean.finalizedBy(cleanLocalDockerImages)
2 changes: 1 addition & 1 deletion docker/kafka-setup/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dockerClean.finalizedBy(mkdirBuildDocker)

task cleanLocalDockerImages {
doLast {
rootProject.ext.cleanLocalDockerImages(docker_registry, docker_repo, "${version}".toString())
rootProject.ext.cleanLocalDockerImages(docker_registry, docker_repo, "${version}")
}
}
dockerClean.finalizedBy(cleanLocalDockerImages)
1 change: 1 addition & 0 deletions gradle/docker/docker.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ ext.getDockerContainers = {

ext.cleanLocalDockerImages = {
String docker_registry, String docker_repo, String docker_tag ->
println("Docker image string: ${docker_registry}/${docker_repo}:${docker_tag}")
def containers = getDockerContainers(docker_registry, docker_repo, docker_tag)
if(!containers.isEmpty()) {
println "Stopping containers: $containers"
Expand Down
2 changes: 1 addition & 1 deletion metadata-jobs/mae-consumer-job/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ tasks.getByName("docker").dependsOn([bootJar])

task cleanLocalDockerImages {
doLast {
rootProject.ext.cleanLocalDockerImages(docker_registry, docker_repo, "${version}".toString())
rootProject.ext.cleanLocalDockerImages(docker_registry, docker_repo, "${version}")
}
}
dockerClean.finalizedBy(cleanLocalDockerImages)
2 changes: 1 addition & 1 deletion metadata-jobs/mce-consumer-job/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ tasks.getByName("docker").dependsOn([bootJar])

task cleanLocalDockerImages {
doLast {
rootProject.ext.cleanLocalDockerImages(docker_registry, docker_repo, "${version}".toString())
rootProject.ext.cleanLocalDockerImages(docker_registry, docker_repo, "${version}")
}
}
dockerClean.finalizedBy(cleanLocalDockerImages)

0 comments on commit 4908544

Please sign in to comment.