diff --git a/provider/legal-aws/README.md b/provider/legal-aws/README.md index b1a551287db8ffb8a9f40903bbf2f2eaa8570817..ca8ed59f33db37ddb6f9480ea3f44e7a6a578426 100644 --- a/provider/legal-aws/README.md +++ b/provider/legal-aws/README.md @@ -52,13 +52,13 @@ You may need to configure access to the remote maven repository that holds the O * Navigate to the service's root folder and run: ```bash -mvn clean package -pl legal-core,provider/legal-aws +mvn clean package -P aws ``` * If you wish to build the project without running tests ```bash -mvn clean package -pl legal-core,provider/legal-aws -DskipTests +mvn clean package -P aws -DskipTests ``` After configuring your environment as specified above, you can follow these steps to run the application. These steps should be invoked from the *repository root.* diff --git a/provider/legal-aws/build-aws/Dockerfile b/provider/legal-aws/build-aws/Dockerfile index ff76bf1f9704db96b4ff5e598650a33c94748615..9725bae2ef4d77d2d2384b8d4947194b3994847c 100644 --- a/provider/legal-aws/build-aws/Dockerfile +++ b/provider/legal-aws/build-aws/Dockerfile @@ -13,11 +13,16 @@ # limitations under the License. # https://docs.spring.io/spring-boot/docs/current/reference/html/deployment.html -FROM public.ecr.aws/amazoncorretto/amazoncorretto:17 +FROM registry.repo.osdu.aws/amazoncorretto:17-alpine -RUN yum update -y && yum install -y shadow-utils \ - && groupadd -g 10001 -r appgroup \ - && useradd -M -g 10001 -r -u 10001 appuser +RUN apk update && \ + apk add --no-cache \ + bash \ + curl \ + shadow \ + && \ + /usr/sbin/groupadd -g 10001 -r appgroup && \ + /usr/sbin/useradd -M -g 10001 -r -u 10001 appuser ARG JAR_FILE=provider/legal-aws/target/*spring-boot.jar diff --git a/provider/legal-aws/build-aws/buildspec.yaml b/provider/legal-aws/build-aws/buildspec.yaml index de165e26ef29ea2d2009d73cc02f9fd3229403d9..ecc0636a7c5d852d6285b36d618f73fa14d0c291 100644 --- a/provider/legal-aws/build-aws/buildspec.yaml +++ b/provider/legal-aws/build-aws/buildspec.yaml @@ -76,13 +76,10 @@ phases: - echo "--Copying Helm Charts to ${OUTPUT_DIR:-dist}--" - rsync -r devops/aws/* "${OUTPUT_DIR:-dist}" - - echo "Building docker image..." - - docker build -f provider/legal-aws/build-aws/Dockerfile -t ${ECR_IMAGE} . - - docker tag ${ECR_IMAGE} ${ECR_IMAGE_BRANCH_LATEST} - - - echo "Pushing docker image..." - - docker push ${ECR_IMAGE} - - docker push ${ECR_IMAGE_BRANCH_LATEST} + - echo "Build and push docker image..." + - docker buildx create --driver docker-container --use + - docker buildx inspect --bootstrap + - docker buildx build --platform linux/arm64/v8,linux/amd64 --pull --push -f provider/legal-aws/build-aws/Dockerfile -t ${ECR_IMAGE} -t ${ECR_IMAGE_BRANCH_LATEST} . - echo "Generate build-info.json" - | diff --git a/provider/legal-aws/pom.xml b/provider/legal-aws/pom.xml index f1558d25d5fb2b69e74b00abdbafad20809d07a6..3814c4c3bbebd65eddb8469ad250aa9305a4364f 100644 --- a/provider/legal-aws/pom.xml +++ b/provider/legal-aws/pom.xml @@ -65,6 +65,10 @@ <artifactId>jakarta.inject-api</artifactId> <version>2.0.1</version> </dependency> + <dependency> + <groupId>jakarta.servlet</groupId> + <artifactId>jakarta.servlet-api</artifactId> + </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId>