Last active
January 21, 2020 03:37
-
-
Save umnagendra/eaf01070052e8c6c714ef8fc56d8749a to your computer and use it in GitHub Desktop.
Spring Boot Demo as a Docker Container
This file contains hidden or 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 | |
| RUN apt-get update \ | |
| && apt-get -y install openjdk-8-jdk \ | |
| && apt-get -y install git \ | |
| && mkdir -p /src \ | |
| && cd /src \ | |
| && git clone https://github.com/buzypi/spring-boot-hello.git \ | |
| && cd spring-boot-hello \ | |
| && ./mvnw clean install \ | |
| && apt-get -y remove --purge git \ | |
| && apt -y autoremove | |
| WORKDIR /src/spring-boot-hello/target | |
| CMD ["java", "-jar", "./spring-boot-hello-0.0.1-SNAPSHOT.jar"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment