build.gradle 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. buildscript {
  2. repositories {
  3. maven { url 'https://maven.aliyun.com/repository/central' }
  4. }
  5. dependencies {
  6. classpath('se.transmode.gradle:gradle-docker:1.2')
  7. }
  8. }
  9. apply plugin: 'docker'
  10. apply plugin: 'application'
  11. group 'cn.tonyandmoney.tuon'
  12. version '0.0.1'
  13. dependencies {
  14. compile project(':tuon-core')
  15. compile project(':tuon-qywx')
  16. }
  17. task dockerBuilder(type: Docker) {
  18. registry='docker.tonyandmoney.cn'
  19. applicationName = 'tuon-fw'
  20. tagVersion = jar.version
  21. addFile("./${jar.baseName}-${jar.version}.jar","app.jar")
  22. entryPoint(["java","-XX:+UnlockExperimentalVMOptions","-XX:+UseCGroupMemoryLimitForHeap","-Djava.security.egd=file:/dev/./urandom","-Duser.timezone=GMT+08","-jar",'app.jar'])
  23. exposePort(11000)
  24. doFirst {
  25. copy {
  26. from jar
  27. into stageDir
  28. }
  29. }
  30. push = true
  31. }
  32. dockerBuilder.dependsOn(bootJar)
  33. task innerDockerBuilder(type: Docker){
  34. registry='registry.tuonq.cn:5000'
  35. applicationName = 'tuonq-config'
  36. tagVersion = jar.version
  37. addFile("./${jar.baseName}-${jar.version}.jar","app.jar")
  38. entryPoint(["java","-XX:+UnlockExperimentalVMOptions","-XX:+UseCGroupMemoryLimitForHeap","-Djava.security.egd=file:/dev/./urandom","-Duser.timezone=GMT+08","-jar",'app.jar'])
  39. exposePort(11000)
  40. doFirst {
  41. copy {
  42. from jar
  43. into stageDir
  44. }
  45. }
  46. push = true
  47. }
  48. innerDockerBuilder.dependsOn(bootJar)