From c52eb74574835eae5f3c4574065da661bde721d7 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 2 Feb 2020 19:06:54 +0100 Subject: Add Dockerfile for remote development mode. Change-Id: Ica13917f0fbb3fedbb7bebed7a3995803baa06c4 --- build.gradle | 6 ++++++ src/main/docker/Dockerfile.dev | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 src/main/docker/Dockerfile.dev diff --git a/build.gradle b/build.gradle index 7302b0d..d7c4fea 100644 --- a/build.gradle +++ b/build.gradle @@ -99,6 +99,8 @@ version "${projectVersion}" task yarnInstall(type:Exec) { def resourceDir = "src/main/resources/META-INF/resources" + onlyIf { !project.hasProperty('skipWeb') } + inputs.file "${resourceDir}/package.json" outputs.dir "${resourceDir}/node_modules" outputs.file "${resourceDir}/yarn.lock" @@ -110,6 +112,8 @@ task yarnInstall(type:Exec) { task snowpack(type:Exec) { def resourceDir = "src/main/resources/META-INF/resources" + onlyIf { !project.hasProperty('skipWeb') } + dependsOn yarnInstall inputs.dir "${resourceDir}/node_modules" @@ -136,6 +140,8 @@ processResources { quarkusBuild.dependsOn compileWeb task buildDocker(type: DockerBuildImage) { + onlyIf { !project.hasProperty('skipDocker') } + inputDir = file(".") dockerFile = file("src/main/docker/Dockerfile.jvm") images.add("docker.benkard.de/mulk/mulkcms2:${projectVersion}") diff --git a/src/main/docker/Dockerfile.dev b/src/main/docker/Dockerfile.dev new file mode 100644 index 0000000..5560f64 --- /dev/null +++ b/src/main/docker/Dockerfile.dev @@ -0,0 +1,17 @@ +FROM gradle:6.1-jdk13 + +EXPOSE 8080 +USER gradle + +COPY --chown=gradle:gradle build.gradle gradle.properties settings.gradle /src/ + +WORKDIR /src +RUN gradle --no-daemon dependencies + +COPY --chown=gradle:gradle src /src/src +RUN gradle --no-daemon assemble -PskipWeb -PskipDocker + +ENV JAVA_TOOL_OPTIONS "-XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact" +#ENV GRADLE_OPTS "-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" + +ENTRYPOINT ["gradle", "quarkusDev"] -- cgit v1.2.3