Skip to content

Commit

Permalink
Docker issues
Browse files Browse the repository at this point in the history
  • Loading branch information
escv committed Oct 7, 2018
1 parent 90b8ecb commit 3479938
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java'
id 'com.palantir.docker' version '0.19.2'
id 'com.palantir.docker-run' version '0.19.2'
id 'com.palantir.docker' version '0.20.1'
id 'com.palantir.docker-run' version '0.20.1'
}

repositories {
Expand All @@ -12,8 +12,7 @@ task wrapper(type: Wrapper) {
jarFile = rootProject.file('.gradle-wrapper/gradle-wrapper.jar')
}

task dist() {
dependsOn compileJava
task dist {
def aggSourceDirs = [] as LinkedList
bndWorkspace.models.each{
def fromFile = new File(it.value.base, "generated/")
Expand All @@ -32,20 +31,17 @@ task dist() {
}

task packageZip(type: Zip) {
dependsOn dist
archiveName = "younic.zip"
destinationDir = file("cnf/release")
from "cnf/run"
}

docker {
dependsOn packageZip
docker (){
name 'escv/younic'
//name 'hub.docker.com/escv/younic'
//tags 'latest'
dockerfile file('container/Dockerfile')
dependsOn packageZip
files file("cnf/release/younic.zip")
files 'cnf/release/younic.zip'
pull true
noCache true
}
Expand All @@ -58,3 +54,7 @@ dockerRun {
daemonize true
env 'YOUNIC_CMS_ROOT_GIT': 'https://github.com/escv/younic-sample.git'
}

compileJava.dependsOn clean
dist.dependsOn compileJava
packageZip.dependsOn dist
2 changes: 1 addition & 1 deletion container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN apk --update add git openssh && \
rm /var/cache/apk/*

# ADD http://andre.webofferte.com/younic/younic.zip ./younic.zip
ADD cnf/release/younic.zip ./younic.zip
ADD younic.zip ./younic.zip

RUN unzip younic.zip && \
rm younic.zip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private void setupFileInstallDeployFolders(BundleContext context) {
addFileInstallDeployFolder(extBundleDir);
String runAdmin = System.getenv("YOUNIC_RUN_ADMIN");
LOG.info("Check if run in Admin Mode: "+runAdmin);
if (runAdmin.equals("true")) {
if (runAdmin != null && runAdmin.equals("true")) {
File admBundleDir = new File("bundle-adm");
addFileInstallDeployFolder(admBundleDir);
}
Expand Down

0 comments on commit 3479938

Please sign in to comment.