pambrose/prometheus-proxy

View on GitHub
etc/docker/proxy.df

Summary

Maintainability
Test Coverage
FROM alpine
MAINTAINER Paul Ambrose "pambrose@mac.com"
RUN apk add openjdk17-jre

# Define the user to use in this instance to prevent using root that even in a container, can be a security risk.
ENV APPLICATION_USER prometheus

# Then add the user, create the /app folder and give permissions to our user.
RUN adduser --disabled-password --gecos '' $APPLICATION_USER

RUN mkdir /app
RUN chown -R $APPLICATION_USER /app

# Mark this container to use the specified $APPLICATION_USER
USER $APPLICATION_USER

# Make /app the working directory
WORKDIR /app

COPY ./build/libs/prometheus-proxy.jar /app/prometheus-proxy.jar

EXPOSE 8080
EXPOSE 8082
EXPOSE 8092
EXPOSE 50051
EXPOSE 50440

CMD []

ENTRYPOINT ["java", "-server", "-XX:+UnlockExperimentalVMOptions", "-XX:+UseG1GC", "-XX:MaxGCPauseMillis=100", "-XX:+UseStringDeduplication", "-jar", "/app/prometheus-proxy.jar"]