Skip to content

Instantly share code, notes, and snippets.

@jebeaudet
Last active July 25, 2023 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jebeaudet/8b03d800033ef850f7fb8a3712ecda8e to your computer and use it in GitHub Desktop.
Save jebeaudet/8b03d800033ef850f7fb8a3712ecda8e to your computer and use it in GitHub Desktop.
Dockerfile for Named Locks using Redisson
FROM maven:3.9.3-eclipse-temurin-17
RUN addgroup --gid 1001 jenkins
RUN adduser --uid 1001 --gid 1001 --disabled-password --gecos '' jenkins
RUN mkdir -p /usr/share/maven/lib/ext/redisson/
RUN apt update
RUN apt install -y wget unzip
# Resolver version is defined here https://github.com/apache/maven/blob/maven-3.9.3/pom.xml#L150
ENV MAVEN_RESOLVER_VERSION=1.9.13
ENV REDISSON_DIR=/usr/share/maven/lib/ext/redisson/
ENV RESOLVED_REDISSON_BUNDLE_ZIP=maven-resolver-named-locks-redisson-$MAVEN_RESOLVER_VERSION-bundle.zip
RUN wget -P $REDISSON_DIR https://repo.maven.apache.org/maven2/org/apache/maven/resolver/maven-resolver-named-locks-redisson/$MAVEN_RESOLVER_VERSION/$RESOLVED_REDISSON_BUNDLE_ZIP
RUN unzip $REDISSON_DIR/$RESOLVED_REDISSON_BUNDLE_ZIP -d $REDISSON_DIR
RUN rm $REDISSON_DIR/$RESOLVED_REDISSON_BUNDLE_ZIP
USER jenkins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment