build_docker.gradle 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. buildscript {
  2. repositories {
  3. jcenter()
  4. maven { url 'http://maven.aliyun.com/nexus/content/groups/public/'}
  5. }
  6. }
  7. //docker
  8. plugins {
  9. id 'java'
  10. id 'com.google.cloud.tools.jib' version "${jibGradlePluginVersion}"
  11. id 'org.springframework.boot' version "${springBootVersion}"
  12. }
  13. apply plugin: 'com.google.cloud.tools.jib'
  14. description = "maxkey-web-manage"
  15. jib {
  16. from {
  17. image = 'openjdk:8-jre-alpine'
  18. }
  19. to {
  20. //https://registry.hub.docker.com/repository/docker/maxkeytop/maxkey-mgt
  21. image = "maxkeytop/maxkey-mgt"
  22. tags = ["${project.version}".toString(), 'latest']
  23. auth {
  24. username = "maxkeytop"
  25. password = "password"
  26. }
  27. }
  28. container {
  29. mainClass = "org.maxkey.MaxKeyMgtApplication"
  30. jvmFlags = ['-Dfile.encoding=utf-8', '-Dserver.port=9527','-Duser.timezone=Asia/Shanghai']
  31. ports = ['9527']
  32. }
  33. }
  34. dependencies {
  35. compile project(":maxkey-common")
  36. compile project(":maxkey-core")
  37. compile project(":maxkey-persistence")
  38. compile project(":maxkey-authentications:maxkey-authentication-core")
  39. compile project(":maxkey-authentications:maxkey-authentication-captcha")
  40. compile project(":maxkey-authentications:maxkey-authentication-otp")
  41. compile project(":maxkey-protocols:maxkey-protocol-oauth-2.0")
  42. compile project(":maxkey-protocols:maxkey-protocol-saml-2.0")
  43. compile project(":maxkey-identitys:maxkey-identity-scim")
  44. compile project(":maxkey-identitys:maxkey-identity-rest")
  45. }