123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- 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')
- }
- 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 }
|