Skip to content

Instantly share code, notes, and snippets.

@pavlospt
Created April 2, 2020 10:59
Show Gist options
  • Select an option

  • Save pavlospt/bf6e78d4759d58b8471281b2addbe162 to your computer and use it in GitHub Desktop.

Select an option

Save pavlospt/bf6e78d4759d58b8471281b2addbe162 to your computer and use it in GitHub Desktop.
FROM balenalib/raspberrypi3-openjdk:8-jdk
ENV APPLICATION_USER ktor
RUN useradd -ms /bin/bash $APPLICATION_USER
RUN mkdir /app
RUN chown -R $APPLICATION_USER /app
USER $APPLICATION_USER
COPY ./build/libs/the_app.jar /app/the_app.jar
WORKDIR /app
CMD ["java", "-server", "-XX:+UnlockExperimentalVMOptions", "-XX:+UseCGroupMemoryLimitForHeap", "-XX:InitialRAMFraction=2", "-XX:MinRAMFraction=2", "-XX:MaxRAMFraction=2", "-XX:+UseG1GC", "-XX:MaxGCPauseMillis=100", "-XX:+UseStringDeduplication", "-jar", "the_app.jar"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment