Skip to content

Instantly share code, notes, and snippets.

@binjoo
Created March 2, 2022 02:30
Show Gist options
  • Save binjoo/f4575595ec21417cd6a6c22cacaa725c to your computer and use it in GitHub Desktop.
Save binjoo/f4575595ec21417cd6a6c22cacaa725c to your computer and use it in GitHub Desktop.
SpringBoot Dockerfile
FROM openjdk:8-jdk-alpine
ADD springboot.jar app.jar
EXPOSE 8080
ENV ACTIVE dev
ENTRYPOINT ["java", "-Xmx128m", "-Xss256k", "-XX:ParallelGCThreads=2", "-Djava.compiler=NONE", "-jar", "/app.jar", "--spring.profiles.active=${ACTIVE}"]
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' >/etc/timezone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment