diff options
author | Luke Granger-Brown <git@lukegb.com> | 2020-07-05T13·05+0000 |
---|---|---|
committer | Luke Granger-Brown <git@lukegb.com> | 2020-07-05T13·05+0000 |
commit | 2e185f50c38db1a85f39a6bd5ad4c4e58462f003 (patch) | |
tree | 2c5705c618802cdeeb141b38787eb7382723606b /gradle/dockerjib.gradle |
Squashed 'third_party/apereo-cas/overlay/' content from commit 2881b2c0d
git-subtree-dir: third_party/apereo-cas/overlay git-subtree-split: 2881b2c0d8dcaae25582c4607f2dbadfb5a50953
Diffstat (limited to 'gradle/dockerjib.gradle')
-rw-r--r-- | gradle/dockerjib.gradle | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/gradle/dockerjib.gradle b/gradle/dockerjib.gradle new file mode 100644 index 000000000000..dbadd5aa19bd --- /dev/null +++ b/gradle/dockerjib.gradle @@ -0,0 +1,52 @@ +apply plugin: "com.google.cloud.tools.jib" + +jib { + from { + image = project.baseDockerImage + } + to { + image = "${project.group}/${project.name}" + /** + ecr-login: Amazon Elastic Container Registry (ECR) + gcr: Google Container Registry (GCR) + osxkeychain: Docker Hub + */ + credHelper = "osxkeychain" + /** + auth { + username = "*******" + password = "*******" + } + */ + tags = ["v" + casServerVersion] + } + container { + creationTime = "USE_CURRENT_TIMESTAMP" + entrypoint = ['docker/entrypoint.sh'] + ports = ['80', '443', '8080', '8443'] + labels = [version:casServerVersion, name:project.name, group:project.group] + } + extraDirectories { + paths = 'src/main/jib' + permissions = [ + '/docker/entrypoint.sh': '755' + ] + } + allowInsecureRegistries = project.allowInsecureRegistries +} + +task copyWebAppIntoJib(type: Copy, group: "Docker", description: "Copy the web application into Docker image") { + dependsOn build + from "build/libs/${casWebApplicationBinaryName}" + into "src/main/jib/docker/cas/war" +} + +task copyConfigIntoJib(type: Copy, group: "Docker", description: "Copy the CAS configuration into Docker image") { + dependsOn build + from "etc/cas" + into "src/main/jib/docker/cas" +} + +task deleteWebAppFromJib(type: Delete, group: "Docker", description: "Explodes the CAS web application archive") { + delete "src/main/jib/docker/cas" +} \ No newline at end of file |