Repository navigation
Expand file tree
/
Copy pathDockerfile-alpine
More file actions
51 lines (40 loc) · 2.13 KB
/
Copy pathDockerfile-alpine
File metadata and controls
51 lines (40 loc) · 2.13 KB
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
45
46
47
48
49
50
51
# The contents of this file are subject to the terms of the Common Development and
# Distribution License (the License). You may not use this file except in compliance with the
# License.
#
# You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
# specific language governing permission and limitations under the License.
#
# When distributing Covered Software, include this CDDL Header Notice in each file and include
# the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
# Header, with the fields enclosed by brackets [] replaced by your own identifying
# information: "Portions copyright [year] [name of copyright owner]".
#
# Copyright 2024-2026 3A Systems, LLC.
FROM alpine:latest
LABEL org.opencontainers.image.authors="Open Identity Platform Community"
ENV USER="openicf"
ENV OPENICF_OPTS="-server -XX:+UseContainerSupport --add-exports java.base/com.sun.jndi.ldap=ALL-UNNAMED "
ARG VERSION
ARG TARGETARCH
WORKDIR /opt
# build.yml uncomments the COPY to build the image from the ZIP of the commit under test;
# without it the openicf-$VERSION.zip of the release is downloaded
#COPY OpenICF-java-framework/openicf-zip/target/*.zip ./
RUN apk add --update --no-cache --virtual builddeps curl unzip \
&& apk upgrade --update --no-cache \
&& if [ "$TARGETARCH" = "386" ]; then JDK=openjdk11-jre; else JDK=openjdk25-jre; fi \
&& apk add bash "$JDK" \
&& bash -c 'if [ ! -z "$VERSION" ] && ! ls ./openicf-*.zip >/dev/null 2>&1 ; then 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"]