-
Notifications
You must be signed in to change notification settings - Fork 25
/
Dockerfile-alpine
33 lines (23 loc) · 1.1 KB
/
Dockerfile-alpine
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
FROM openjdk:8-jre-alpine
MAINTAINER Open Identity Platform Community <[email protected]>
ENV USER="openicf"
ENV OPENICF_OPTS="-server -XX:+UseContainerSupport"
ARG VERSION
WORKDIR /opt
#COPY OpenICF-java-framework/openicf-zip/target/*.zip ./
RUN apk add --update --no-cache --virtual builddeps curl unzip \
&& apk upgrade --update --no-cache \
&& apk add bash \
&& bash -c 'if [ ! -z "$VERSION" ] ; then rm -rf ./*.zip ; curl -L https://github.com/OpenIdentityPlatform/OpenICF/releases/download/$VERSION/openicf-$VERSION.zip --output openicf-$VERSION.zip ; fi' \
&& unzip openicf-*.zip && rm -rf *.zip \
&& apk del unzip \
&& addgroup -S $USER \
&& adduser -S -u 1001 -G $USER $USER \
&& install -d -o $USER /opt/openicf \
&& chown -R $USER:$USER /opt/openicf \
&& chmod -R g=u /opt/openicf \
&& chmod +x /opt/openicf/bin/*.sh
EXPOSE 8759
USER $USER
HEALTHCHECK --interval=30s --timeout=30s --start-period=1s --retries=3 CMD curl -i -o - --silent http://127.0.0.1:8759/openicf | grep -q "OpenICF Connector Server"
ENTRYPOINT ["/opt/openicf/bin/ConnectorServer.sh","/run"]