Skip to content
This repository was archived by the owner on Jan 20, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion authorize/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ cleanup() {

publish() {
echo "Building Docker image with version $VERSION"
docker build -t $IMAGE_NAME:$VERSION -t $IMAGE_NAME:latest -f ./Dockerfile . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION -t $IMAGE_NAME:latest -f ./docker/Dockerfile . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION-redhat -f ./docker/Dockerfile-Redhat . --no-cache=true
echo "Images built with version $VERSION"
echo "Pushing image to DockerHub"
Expand Down
File renamed without changes.
3 changes: 0 additions & 3 deletions authorize/docker/Dockerfile-Redhat

This file was deleted.

3 changes: 3 additions & 0 deletions authorize/docker/Dockerfile-Slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM openjdk:11.0.3-slim
ADD target/oauth2-authorize.jar server.jar
CMD ["/bin/sh","-c","java -Dlight-4j-config-dir=/config -Dlogback.configurationFile=/config/logback.xml -Djava.security.krb5.conf=/config/krb5.conf -jar /server.jar"]
4 changes: 2 additions & 2 deletions client/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ cleanup() {

publish() {
echo "Building Docker image with version $VERSION"
docker build -t $IMAGE_NAME:$VERSION -t $IMAGE_NAME:latest -f ./Dockerfile . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION-redhat -f ./docker/Dockerfile-Redhat . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION -t $IMAGE_NAME:latest -f ./docker/Dockerfile . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION-slim -f ./docker/Dockerfile-Slim . --no-cache=true
echo "Images built with version $VERSION"
echo "Pushing image to DockerHub"
docker push $IMAGE_NAME
Expand Down
2 changes: 1 addition & 1 deletion client/Dockerfile → client/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ENV JAVA_MINIMAL=/opt/jre
RUN jlink \
--verbose \
--add-modules \
java.base,java.sql,java.naming,java.desktop,java.xml,jdk.crypto.cryptoki,jdk.unsupported,java.management \
java.base,java.sql,java.naming,java.desktop,java.xml,jdk.crypto.cryptoki,jdk.unsupported,java.management,java.security.jgss \
--compress 2 \
--strip-debug \
--no-header-files \
Expand Down
3 changes: 0 additions & 3 deletions client/docker/Dockerfile-Redhat

This file was deleted.

3 changes: 3 additions & 0 deletions client/docker/Dockerfile-Slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM openjdk:11.0.3-slim
ADD target/oauth2-client.jar server.jar
CMD ["/bin/sh","-c","java -Dlight-4j-config-dir=/config -Dlogback.configurationFile=/config/logback.xml -jar /server.jar"]
4 changes: 2 additions & 2 deletions code/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ cleanup() {

publish() {
echo "Building Docker image with version $VERSION"
docker build -t $IMAGE_NAME:$VERSION -t $IMAGE_NAME:latest -f ./Dockerfile . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION-redhat -f ./docker/Dockerfile-Redhat . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION -t $IMAGE_NAME:latest -f ./docker/Dockerfile . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION-slim -f ./docker/Dockerfile-Slim . --no-cache=true
echo "Images built with version $VERSION"
echo "Pushing image to DockerHub"
docker push $IMAGE_NAME
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions code/docker/Dockerfile-Redhat

This file was deleted.

3 changes: 3 additions & 0 deletions code/docker/Dockerfile-Slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM openjdk:11.0.3-slim
ADD target/oauth2-code.jar server.jar
CMD ["/bin/sh","-c","java -Dlight-4j-config-dir=/config -Dlogback.configurationFile=/config/logback.xml -Djava.security.krb5.conf=/config/krb5.conf -jar /server.jar"]
4 changes: 2 additions & 2 deletions key/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ cleanup() {

publish() {
echo "Building Docker image with version $VERSION"
docker build -t $IMAGE_NAME:$VERSION -t $IMAGE_NAME:latest -f ./Dockerfile . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION-redhat -f ./docker/Dockerfile-Redhat . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION -t $IMAGE_NAME:latest -f ./docker/Dockerfile . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION-slim -f ./docker/Dockerfile-Slim . --no-cache=true
echo "Images built with version $VERSION"
echo "Pushing image to DockerHub"
docker push $IMAGE_NAME
Expand Down
2 changes: 1 addition & 1 deletion key/Dockerfile → key/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ENV JAVA_MINIMAL=/opt/jre
RUN jlink \
--verbose \
--add-modules \
java.base,java.sql,java.naming,java.desktop,java.xml,jdk.crypto.cryptoki,jdk.unsupported,java.management \
java.base,java.sql,java.naming,java.desktop,java.xml,jdk.crypto.cryptoki,jdk.unsupported,java.management,java.security.jgss \
--compress 2 \
--strip-debug \
--no-header-files \
Expand Down
3 changes: 0 additions & 3 deletions key/docker/Dockerfile-Redhat

This file was deleted.

3 changes: 3 additions & 0 deletions key/docker/Dockerfile-Slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM openjdk:11.0.3-slim
ADD target/oauth2-key.jar server.jar
CMD ["/bin/sh","-c","java -Dlight-4j-config-dir=/config -Dlogback.configurationFile=/config/logback.xml -jar /server.jar"]
60 changes: 60 additions & 0 deletions provider/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/bin/bash

#
# Purpose: Publish docker image new tag to docker hub.
#
# Author: Dinesh Alapati, dine.alapati@gmail.com
#
# Parameters:
# $1: version
#

set -ex

VERSION=$1
IMAGE_NAME="networknt/oauth2-provider"

showHelp() {
echo " "
echo "Error: $1"
echo " "
echo " build.sh [VERSION]"
echo " "
echo " where [VERSION] version of the docker image that you want to publish (example: 0.0.1)"
echo " "
echo " example 1: ./build.sh 0.0.1"
echo " "
}

build() {
echo "Building ..."
mvn clean install
echo "Successfully built!"
}

cleanup() {
if [[ "$(docker images -q $IMAGE_NAME 2> /dev/null)" != "" ]]; then
echo "Removing old $IMAGE_NAME images"
docker images | grep $IMAGE_NAME | awk '{print $3}' | xargs docker rmi -f
echo "Cleanup completed!"
fi
}

publish() {
echo "Building Docker image with version $VERSION"
docker build -t $IMAGE_NAME:$VERSION -t $IMAGE_NAME:latest -f ./docker/Dockerfile . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION-slim -f ./docker/Dockerfile-Slim . --no-cache=true
echo "Images built with version $VERSION"
echo "Pushing image to DockerHub"
docker push $IMAGE_NAME
echo "Image successfully published!"
}

if [ -z $VERSION ]; then
showHelp "[VERSION] parameter is missing"
exit
fi

build;
cleanup;
publish;
2 changes: 1 addition & 1 deletion provider/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ENV JAVA_MINIMAL=/opt/jre
RUN jlink \
--verbose \
--add-modules \
java.base,java.sql,java.naming,java.desktop,java.xml,jdk.crypto.cryptoki,jdk.unsupported,java.management \
java.base,java.sql,java.naming,java.desktop,java.xml,jdk.crypto.cryptoki,jdk.unsupported,java.management,java.security.jgss \
--compress 2 \
--strip-debug \
--no-header-files \
Expand Down
5 changes: 0 additions & 5 deletions provider/docker/Dockerfile-Redhat

This file was deleted.

3 changes: 3 additions & 0 deletions provider/docker/Dockerfile-Slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM openjdk:11.0.3-slim
ADD target/oauth2-provider server.jar
CMD ["/bin/sh","-c","java -Dlight-4j-config-dir=/config -Dlogback.configurationFile=/config/logback.xml -jar /server.jar"]
4 changes: 2 additions & 2 deletions refresh-token/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ cleanup() {

publish() {
echo "Building Docker image with version $VERSION"
docker build -t $IMAGE_NAME:$VERSION -t $IMAGE_NAME:latest -f ./Dockerfile . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION-redhat -f ./docker/Dockerfile-Redhat . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION -t $IMAGE_NAME:latest -f ./docker/Dockerfile . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION-slim -f ./docker/Dockerfile-Slim . --no-cache=true
echo "Images built with version $VERSION"
echo "Pushing image to DockerHub"
docker push $IMAGE_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ENV JAVA_MINIMAL=/opt/jre
RUN jlink \
--verbose \
--add-modules \
java.base,java.sql,java.naming,java.desktop,java.xml,jdk.crypto.cryptoki,jdk.unsupported,java.management \
java.base,java.sql,java.naming,java.desktop,java.xml,jdk.crypto.cryptoki,jdk.unsupported,java.management,java.security.jgss \
--compress 2 \
--strip-debug \
--no-header-files \
Expand Down
3 changes: 0 additions & 3 deletions refresh-token/docker/Dockerfile-Redhat

This file was deleted.

3 changes: 3 additions & 0 deletions refresh-token/docker/Dockerfile-Slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM openjdk:11.0.3-slim
ADD target/oauth2-refresh-token.jar server.jar
CMD ["/bin/sh","-c","java -Dlight-4j-config-dir=/config -Dlogback.configurationFile=/config/logback.xml -jar /server.jar"]
4 changes: 2 additions & 2 deletions service/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ cleanup() {

publish() {
echo "Building Docker image with version $VERSION"
docker build -t $IMAGE_NAME:$VERSION -t $IMAGE_NAME:latest -f ./Dockerfile . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION-redhat -f ./docker/Dockerfile-Redhat . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION -t $IMAGE_NAME:latest -f ./docker/Dockerfile . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION-slim -f ./docker/Dockerfile-Slim . --no-cache=true
echo "Images built with version $VERSION"
echo "Pushing image to DockerHub"
docker push $IMAGE_NAME
Expand Down
2 changes: 1 addition & 1 deletion service/Dockerfile → service/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ENV JAVA_MINIMAL=/opt/jre
RUN jlink \
--verbose \
--add-modules \
java.base,java.sql,java.naming,java.desktop,java.xml,jdk.crypto.cryptoki,jdk.unsupported,java.management \
java.base,java.sql,java.naming,java.desktop,java.xml,jdk.crypto.cryptoki,jdk.unsupported,java.management,java.security.jgss \
--compress 2 \
--strip-debug \
--no-header-files \
Expand Down
3 changes: 0 additions & 3 deletions service/docker/Dockerfile-Redhat

This file was deleted.

3 changes: 3 additions & 0 deletions service/docker/Dockerfile-Slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM openjdk:11.0.3-slim
ADD target/oauth2-service.jar server.jar
CMD ["/bin/sh","-c","java -Dlight-4j-config-dir=/config -Dlogback.configurationFile=/config/logback.xml -jar /server.jar"]
4 changes: 2 additions & 2 deletions token/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ cleanup() {

publish() {
echo "Building Docker image with version $VERSION"
docker build -t $IMAGE_NAME:$VERSION -t $IMAGE_NAME:latest -f ./Dockerfile . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION-redhat -f ./docker/Dockerfile-Redhat . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION -t $IMAGE_NAME:latest -f ./docker/Dockerfile . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION-slim -f ./docker/Dockerfile-Slim . --no-cache=true
echo "Images built with version $VERSION"
echo "Pushing image to DockerHub"
docker push $IMAGE_NAME
Expand Down
2 changes: 1 addition & 1 deletion token/Dockerfile → token/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ENV JAVA_MINIMAL=/opt/jre
RUN jlink \
--verbose \
--add-modules \
java.base,java.sql,java.naming,java.desktop,java.xml,jdk.crypto.cryptoki,jdk.unsupported,java.management \
java.base,java.sql,java.naming,java.desktop,java.xml,jdk.crypto.cryptoki,jdk.unsupported,java.management,java.security.jgss \
--compress 2 \
--strip-debug \
--no-header-files \
Expand Down
3 changes: 0 additions & 3 deletions token/docker/Dockerfile-Redhat

This file was deleted.

3 changes: 3 additions & 0 deletions token/docker/Dockerfile-Slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM openjdk:11.0.3-slim
ADD target/oauth2-token.jar server.jar
CMD ["/bin/sh","-c","java -Dlight-4j-config-dir=/config -Dlogback.configurationFile=/config/logback.xml -jar /server.jar"]
4 changes: 2 additions & 2 deletions user/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ cleanup() {

publish() {
echo "Building Docker image with version $VERSION"
docker build -t $IMAGE_NAME:$VERSION -t $IMAGE_NAME:latest -f ./Dockerfile . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION-redhat -f ./docker/Dockerfile-Redhat . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION -t $IMAGE_NAME:latest -f ./docker/Dockerfile . --no-cache=true
docker build -t $IMAGE_NAME:$VERSION-slim -f ./docker/Dockerfile-Slim . --no-cache=true
echo "Images built with version $VERSION"
echo "Pushing image to DockerHub"
docker push $IMAGE_NAME
Expand Down
2 changes: 1 addition & 1 deletion user/Dockerfile → user/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ENV JAVA_MINIMAL=/opt/jre
RUN jlink \
--verbose \
--add-modules \
java.base,java.sql,java.naming,java.desktop,java.xml,jdk.crypto.cryptoki,jdk.unsupported,java.management \
java.base,java.sql,java.naming,java.desktop,java.xml,jdk.crypto.cryptoki,jdk.unsupported,java.management,java.security.jgss \
--compress 2 \
--strip-debug \
--no-header-files \
Expand Down
3 changes: 0 additions & 3 deletions user/docker/Dockerfile-Redhat

This file was deleted.

3 changes: 3 additions & 0 deletions user/docker/Dockerfile-Slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM openjdk:11.0.3-slim
ADD target/oauth2-user.jar server.jar
CMD ["/bin/sh","-c","java -Dlight-4j-config-dir=/config -Dlogback.configurationFile=/config/logback.xml -jar /server.jar"]