From 88a5663c10573bccfc5e5b4a2f733832039a1241 Mon Sep 17 00:00:00 2001 From: johha Date: Tue, 24 Mar 2026 17:37:31 +0100 Subject: [PATCH 1/2] Replace Tomcat with Spring Boot --- .devcontainer/images/uaa/Dockerfile | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.devcontainer/images/uaa/Dockerfile b/.devcontainer/images/uaa/Dockerfile index ea651b2e62b..5c9c3b6585e 100644 --- a/.devcontainer/images/uaa/Dockerfile +++ b/.devcontainer/images/uaa/Dockerfile @@ -16,7 +16,9 @@ USER root # Adapt issuer URI # Copy to uaa URL -RUN yq e '.issuer.uri = "http://localhost:8080"' -i /uaa.yml \ +# Add password.write authority to admin client (needed for password management tests) +RUN yq e '.oauth.clients.admin.authorities += ",password.write"' -i /uaa.yml \ + && yq e '.issuer.uri = "http://localhost:8080"' -i /uaa.yml \ && yq e '.uaa.url = .issuer.uri' -i /uaa.yml # Runtime image @@ -25,19 +27,18 @@ FROM tomcat:10-jdk21 # Copy config file from yq image COPY --from=yq /uaa.yml /uaa.yml -# Remove pre-installed apps -RUN rm -rf /usr/local/tomcat/webapps/* - -# Copy CF users +# Copy CF users config RUN mkdir -p /usr/local/cf_config COPY uaa.yml /usr/local/cf_config/uaa.yml - -# Install war from build image -COPY --from=builder /uaa/uaa/build/libs/cloudfoundry-identity-uaa-*.war /usr/local/tomcat/webapps/ROOT.war +# Install JAR from build image (Spring Boot executable JAR) +COPY --from=builder /uaa/uaa/build/libs/cloudfoundry-identity-uaa-*.war /app/uaa.jar COPY --from=builder /uaa/k8s/templates/log4j2.properties /log4j2.properties ENV JAVA_OPTS="-DLOGIN_CONFIG_URL=file:///uaa.yml -Dlogging.config=/log4j2.properties -DCLOUDFOUNDRY_CONFIG_PATH=/usr/local/cf_config" -ENV spring_profiles=default +ENV SPRING_PROFILES_ACTIVE=default + +EXPOSE 8080 -EXPOSE 8080 \ No newline at end of file +# Run as Spring Boot application +CMD java $JAVA_OPTS -jar /app/uaa.jar \ No newline at end of file From 369ab50f1a1a1137be683d925cbad82f40648939 Mon Sep 17 00:00:00 2001 From: johha Date: Wed, 25 Mar 2026 10:11:42 +0100 Subject: [PATCH 2/2] claude it up --- .devcontainer/images/uaa/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/images/uaa/Dockerfile b/.devcontainer/images/uaa/Dockerfile index 5c9c3b6585e..e9743c7351d 100644 --- a/.devcontainer/images/uaa/Dockerfile +++ b/.devcontainer/images/uaa/Dockerfile @@ -21,8 +21,8 @@ RUN yq e '.oauth.clients.admin.authorities += ",password.write"' -i /uaa.yml \ && yq e '.issuer.uri = "http://localhost:8080"' -i /uaa.yml \ && yq e '.uaa.url = .issuer.uri' -i /uaa.yml -# Runtime image -FROM tomcat:10-jdk21 +# Runtime image - lightweight JRE instead of Tomcat +FROM sapmachine:21-jre-headless-ubuntu-jammy # Copy config file from yq image COPY --from=yq /uaa.yml /uaa.yml @@ -41,4 +41,4 @@ ENV SPRING_PROFILES_ACTIVE=default EXPOSE 8080 # Run as Spring Boot application -CMD java $JAVA_OPTS -jar /app/uaa.jar \ No newline at end of file +CMD ["sh", "-c", "java $JAVA_OPTS -jar /app/uaa.jar"] \ No newline at end of file