Skip to content
Snippets Groups Projects
Commit c9a4941a authored by Marc Burnie [AWS]'s avatar Marc Burnie [AWS]
Browse files

Merge branch 'aws/arm' into 'master'

AWS: Building multi-arch Alpine images

See merge request !637
parents 4d31796d 235c86b5
No related branches found
No related tags found
1 merge request!637AWS: Building multi-arch Alpine images
Pipeline #301171 passed
......@@ -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.*
......
......@@ -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
......
......@@ -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"
- |
......
......@@ -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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment