12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- apply plugin: 'docker'
- apply plugin: 'application'
- buildscript {
- repositories {
- mavenCentral()
- }
- dependencies {
- classpath('se.transmode.gradle:gradle-docker:1.2')
- }
- }
- dependencies {
- compile project(":zen-api")
- compile project(':cloud-bus')
- compile project(':fastdfs-client')
- compile project(':tuon-core')
- }
- docker{
- baseImage 'openjdk:8-jre-alpine'
- maintainer 'tina 976056042@qq.com'
- registry 'registry.cn-qingdao.aliyuncs.com'
- }
- task dockerBuilder(type: Docker) {
- registry='registry.cn-qingdao.aliyuncs.com/gxzc-envir'
- applicationName = '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)
- bootJar { enabled = true }
- jar { enabled = false }
|