IOT-3244 configurable JMX_HOSTNAME
[iotivity.git] / cloud / account / Dockerfile
1 FROM openjdk:8-jre-alpine
2
3 RUN apk add --update \
4     curl \
5     shadow \
6     && rm -rf /var/cache/apk/*
7
8 RUN groupadd -r iotivity && useradd --no-log-init --system  -g iotivity iotivity
9
10 COPY --chown=iotivity:iotivity ./target/CloudAccount-0.0.1-SNAPSHOT.jar iotivity/AccountServer.jar
11 COPY --chown=iotivity:iotivity ./target/lib/* iotivity/lib/
12 COPY --chown=iotivity:iotivity ./properties/* iotivity/properties/
13 COPY --chown=iotivity:iotivity  ./start.sh iotivity/
14 RUN chmod +x iotivity/start.sh
15
16 WORKDIR iotivity/
17
18 ENV COAP_PORT 5685
19 ENV HEALTH_CHECK_ENABLED 1
20 ENV TLS_MODE 0
21 ENV MONGODB_ADDRESS mongodb
22 ENV MONGODB_PORT 27017
23
24
25 ENV JMX_PORT 9002
26 ENV JMX_HOSTNAME ""
27 ENV JAVA_MEMORY_OPTS ""
28
29 EXPOSE 9002
30
31 USER iotivity
32 ENTRYPOINT [ "./start.sh" ]
33 HEALTHCHECK --interval=30s --timeout=2s --retries=3     CMD curl -f http://localhost:8000/api/healthcheck || exit 1