-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
44 lines (35 loc) · 1.71 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#
# Copyright (C) 2021 B3Partners B.V.
#
# SPDX-License-Identifier: MIT
#
FROM eclipse-temurin:17.0.13_11-jre
ARG TAILORMAP_API_VERSION
ARG BUILD_DATE
ARG TZ="Europe/Amsterdam"
ARG DEBIAN_FRONTEND="noninteractive"
LABEL org.opencontainers.image.authors="[email protected]" \
org.opencontainers.image.description="Tailormap API service provides OpenAPI REST interface for Tailormap" \
org.opencontainers.image.vendor="B3Partners BV" \
org.opencontainers.image.title="Tailormap API" \
org.opencontainers.image.url="https://github.com/Tailormap/tailormap-api/" \
org.opencontainers.image.source="https://github.com/Tailormap/tailormap-api/" \
org.opencontainers.image.documentation="https://github.com/Tailormap/tailormap-api/" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.version=$TAILORMAP_API_VERSION \
org.opencontainers.image.build-date=$BUILD_DATE \
tailormap-api.version=$TAILORMAP_API_VERSION \
tailormap-api.build-date=$BUILD_DATE
# set-up timezone and local user
RUN set -eux;ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
&& apt update && apt upgrade -y \
&& apt install -y jq \
&& apt autoremove -y && apt autoclean && apt clean && rm -rf /tmp/* && rm -rf /var/tmp/* && rm -rf /var/lib/apt/lists/* \
&& useradd -ms /bin/bash spring
USER spring:spring
WORKDIR /home/spring
COPY ./target/tailormap-api-exec.jar tailormap-api.jar
EXPOSE 8080
HEALTHCHECK CMD /bin/bash -c "set -o pipefail; wget -O - -T 5 -q http://127.0.0.1:8080/api/actuator/health | jq -e '.status == \"UP\"'"
# note that Spring Boot logs to the console, there is no logfile
ENTRYPOINT ["java", "-jar", "tailormap-api.jar"]