123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- buildscript {
- repositories {
- maven { url 'https://maven.aliyun.com/repository/central' }
- }
- dependencies {
- classpath('se.transmode.gradle:gradle-docker:1.2')
- }
- }
- apply plugin: 'docker'
- apply plugin: 'application'
- group 'cn.tonyandmoney.tuon'
- version '0.1.0'
- dependencies {
- compile project(':tuon-core')
- compile project(':tuon-qywx')
- compile project(':tuon-gateway')
- compile('org.springframework.cloud:spring-cloud-starter-config')
- implementation('org.springframework.boot:spring-boot-starter-webflux')
- }
- docker{
- baseImage 'openjdk:8-jre-alpine'
- maintainer 'tina 976056042@qq.com'
- registry 'docker.tonyandmoney.cn'
- }
- task dockerBuilder(type: Docker) {
- registry='docker.tonyandmoney.cn'
- applicationName = 'tuon-fw'
- tagVersion = jar.version
- addFile("./${jar.baseName}-${jar.version}.jar","app.jar")
- entryPoint(["java","-XX:+UnlockExperimentalVMOptions","-XX:+UseCGroupMemoryLimitForHeap","-Djava.security.egd=file:/dev/./urandom","-Duser.timezone=GMT+08","-jar",'app.jar'])
- exposePort(11000)
- doFirst {
- copy {
- from jar
- into stageDir
- }
- }
- push = true
- }
- dockerBuilder.dependsOn(bootJar)
- task innerDockerBuilder(type: Docker){
- registry='registry.tuonq.cn:5000'
- applicationName = 'tuon-fw'
- tagVersion = jar.version
- addFile("./${jar.baseName}-${jar.version}.jar","app.jar")
- entryPoint(["java","-XX:+UnlockExperimentalVMOptions","-XX:+UseCGroupMemoryLimitForHeap","-Djava.security.egd=file:/dev/./urandom","-Duser.timezone=GMT+08","-jar",'app.jar'])
- exposePort(11000)
- doFirst {
- copy {
- from jar
- into stageDir
- }
- }
- push = true
- }
- innerDockerBuilder.dependsOn(bootJar)
- bootJar { enabled = true }
- jar { enabled = false }
|