12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- 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.0.1'
- dependencies {
- compile project(':tuon-core')
- compile project(':tuon-qywx')
- }
- 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 = 'tuonq-config'
- 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)
|