build_docker.gradle 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. buildscript {
  2. repositories {
  3. jcenter()
  4. maven { url 'http://maven.aliyun.com/nexus/content/groups/public/'}
  5. }
  6. }
  7. plugins {
  8. id 'java'
  9. id 'com.google.cloud.tools.jib' version "${jibGradlePluginVersion}"
  10. id 'org.springframework.boot' version "${springBootVersion}"
  11. }
  12. apply plugin: 'com.google.cloud.tools.jib'
  13. description = "maxkey-web-maxkey"
  14. //docker
  15. jib {
  16. from {
  17. image = 'openjdk:8-jre-alpine'
  18. }
  19. to {
  20. //https://registry.hub.docker.com/repository/docker/maxkeytop/maxkey
  21. image = "maxkeytop/maxkey"
  22. tags = ["${project.version}".toString(), 'latest']
  23. auth {
  24. username = "maxkeytop"
  25. password = "password"
  26. }
  27. }
  28. container {
  29. mainClass = "org.maxkey.MaxKeyApplication"
  30. jvmFlags = ['-Dfile.encoding=utf-8', '-Dserver.port=443','-Duser.timezone=Asia/Shanghai']
  31. ports = ['443']
  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-social")
  40. compile project(":maxkey-authentications:maxkey-authentication-captcha")
  41. compile project(":maxkey-authentications:maxkey-authentication-otp")
  42. compile project(":maxkey-protocols:maxkey-protocol-authorize")
  43. compile project(":maxkey-protocols:maxkey-protocol-cas")
  44. compile project(":maxkey-protocols:maxkey-protocol-desktop")
  45. compile project(":maxkey-protocols:maxkey-protocol-extendapi")
  46. compile project(":maxkey-protocols:maxkey-protocol-formbased")
  47. compile project(":maxkey-protocols:maxkey-protocol-tokenbased")
  48. compile project(":maxkey-protocols:maxkey-protocol-oauth-2.0")
  49. compile project(":maxkey-protocols:maxkey-protocol-saml-2.0")
  50. compile project(":maxkey-protocols:maxkey-protocol-jwt")
  51. }