build.gradle 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. apply plugin: 'docker'
  2. apply plugin: 'application'
  3. buildscript {
  4. repositories {
  5. mavenCentral()
  6. }
  7. dependencies {
  8. classpath('se.transmode.gradle:gradle-docker:1.2')
  9. }
  10. }
  11. dependencies {
  12. compile project(":zen-api")
  13. compile project(':cloud-bus')
  14. compile project(':fastdfs-client')
  15. compile project(':tuon-core')
  16. }
  17. docker{
  18. baseImage 'openjdk:8-jre-alpine'
  19. maintainer 'tina 976056042@qq.com'
  20. registry 'registry.cn-qingdao.aliyuncs.com'
  21. }
  22. task dockerBuilder(type: Docker) {
  23. registry='registry.cn-qingdao.aliyuncs.com/gxzc-envir'
  24. applicationName = 'fw'
  25. tagVersion = jar.version
  26. addFile("./${jar.baseName}-${jar.version}.jar","app.jar")
  27. entryPoint(["java","-XX:+UnlockExperimentalVMOptions","-XX:+UseCGroupMemoryLimitForHeap","-Djava.security.egd=file:/dev/./urandom","-Duser.timezone=GMT+08","-jar",'app.jar'])
  28. exposePort(11000)
  29. doFirst {
  30. copy {
  31. from jar
  32. into stageDir
  33. }
  34. }
  35. push = true
  36. }
  37. dockerBuilder.dependsOn(bootJar)
  38. bootJar { enabled = true }
  39. jar { enabled = false }