Created
March 23, 2021 20:54
-
-
Save AngerM/2cdfc16314cae1f481e43b8ff997926d to your computer and use it in GitHub Desktop.
Kotlin Build EX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task Main(type: CreateStartScripts) { | |
mainClassName = 'my_main_class' | |
applicationName = 'my_app' | |
outputDir = new File(project.buildDir, 'tmp') | |
classpath = startScripts.classpath | |
} | |
applicationDistribution.into('bin') { | |
from(Main) | |
fileMode = 0755 | |
applicationName = "my_app" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM gradle:jdk11 as builder | |
RUN mkdir /workspace | |
RUN chown -R gradle /workspace | |
USER gradle | |
WORKDIR /workspace | |
COPY . /workspace | |
RUN gradle test installDist --no-daemon | |
FROM openjdk:11-jdk-slim-buster as runner | |
WORKDIR /home | |
COPY --from=builder /workspace/build/install . | |
ENTRYPOINT ["/home/my_app/bin/my_app"] | |
EXPOSE 8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment