Last active
November 1, 2020 19:24
-
-
Save OtherDevOpsGene/2dc8a5d4f44007e19533438b106d2649 to your computer and use it in GitHub Desktop.
Smaller Dockerfile for Docker Workshop
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 ubuntu:latest AS development | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
default-jdk-headless maven git \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN git clone https://github.com/OtherDevOpsGene/helloworld.git | |
WORKDIR helloworld | |
RUN mvn clean package | |
FROM openjdk:alpine AS runtime | |
COPY --from=development /helloworld/target/helloworld-1.1.jar / | |
CMD ["java", "-cp", "/helloworld-1.1.jar", \ | |
"com.coveros.demo.helloworld.HelloWorld"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment