Skip to content

Instantly share code, notes, and snippets.

@umnagendra
Last active January 21, 2020 03:37
Show Gist options
  • Select an option

  • Save umnagendra/eaf01070052e8c6c714ef8fc56d8749a to your computer and use it in GitHub Desktop.

Select an option

Save umnagendra/eaf01070052e8c6c714ef8fc56d8749a to your computer and use it in GitHub Desktop.
Spring Boot Demo as a Docker Container
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