From 33518f83b48ed04891686d81b976b49bd4353ec0 Mon Sep 17 00:00:00 2001 From: James Barnett Date: Thu, 7 Sep 2023 11:34:00 +0100 Subject: [PATCH] Add dockerfile --- Dockerfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..75318d51 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM eclipse-temurin:17-alpine +COPY ./build/libs/energy-label-service-SNAPSHOT.jar app.jar + +RUN apk update && apk upgrade && rm -rf /var/cache/apk/* + +ENV TZONE="Europe/London" +RUN apk add --update tzdata \ +&& echo "${TZONE}" > /etc/timezone \ +&& ln -sf /usr/share/zoneinfo/${TZONE} /etc/localtime + +RUN adduser -S elg +USER elg + +ENTRYPOINT exec java $JAVA_OPTS -jar app.jar \ No newline at end of file