Skip to content

Commit

Permalink
Wm 2274 pg dump image (#1507)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvoet authored Oct 17, 2023
1 parent 04f8496 commit bfefb86
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
12 changes: 12 additions & 0 deletions azureDatabaseUtils/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
### This Dockerfile is used to extend the app-sec blessed Docker image for JRE-17
### We extend the base image to include a PostgreSQL client -- the client is primarily used
### for pg_dump commands to backup/restore the database.

### Sourced from https://github.com/broadinstitute/dsp-appsec-blessed-images/blob/main/jre/Dockerfile.17-debian
FROM us.gcr.io/broad-dsp-gcr-public/base/jre:17-debian

# Add postgres client for pg_dump command and clean up
RUN apt-get update \
&& apt-get install postgresql-client-14 -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
11 changes: 9 additions & 2 deletions azureDatabaseUtils/gradle/deploy.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@ import java.time.ZonedDateTime
// Deploy config
jib {
from {
// see https://github.com/broadinstitute/dsp-appsec-blessed-images/tree/main/jre
image = "us.gcr.io/broad-dsp-gcr-public/base/jre:17-distroless"
// docker:// specifies a local image
image = "docker://azure-database-utils-base:latest"
}
extraDirectories {
paths = [file(jibExtraDirectory)]
}
}

tasks.register('buildBaseImage', Exec) {
workingDir "$projectDir"
commandLine "docker", "build", "-t", "azure-database-utils-base:latest", "."
}

jibDockerBuild.dependsOn('buildBaseImage')

0 comments on commit bfefb86

Please sign in to comment.