Skip to content
Snippets Groups Projects
Commit 62b28fec 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 !726
parents ed0a085b c6539381
No related branches found
No related tags found
1 merge request!726AWS: Building multi-arch Alpine images
Pipeline #299553 failed
...@@ -13,15 +13,19 @@ ...@@ -13,15 +13,19 @@
# limitations under the License. # limitations under the License.
# https://docs.spring.io/spring-boot/docs/current/reference/html/deployment.html # https://docs.spring.io/spring-boot/docs/current/reference/html/deployment.html
FROM amazoncorretto:17 FROM registry.repo.osdu.aws/amazoncorretto:17-alpine
RUN yum update -y && yum install -y shadow-utils \ RUN apk update && \
&& groupadd -g 10001 -r appgroup \ apk add --no-cache \
&& useradd -M -g 10001 -r -u 10001 appuser bash \
curl \
shadow \
&& \
/usr/sbin/groupadd -g 10001 -r appgroup && \
/usr/sbin/useradd -M -g 10001 -r -u 10001 appuser
ARG JAR_FILE=provider/schema-aws/target/*-spring-boot.jar ARG JAR_FILE=provider/schema-aws/target/*-spring-boot.jar
WORKDIR / WORKDIR /
COPY ${JAR_FILE} app.jar COPY ${JAR_FILE} app.jar
COPY /provider/schema-aws/build-aws/entrypoint.sh /entrypoint.sh COPY /provider/schema-aws/build-aws/entrypoint.sh /entrypoint.sh
......
...@@ -101,12 +101,10 @@ phases: ...@@ -101,12 +101,10 @@ phases:
- echo "--Copying Helm Charts to ${OUTPUT_DIR:-dist}--" - echo "--Copying Helm Charts to ${OUTPUT_DIR:-dist}--"
- rsync -r devops/aws/* "${OUTPUT_DIR:-dist}" - rsync -r devops/aws/* "${OUTPUT_DIR:-dist}"
- echo "Building docker image..." - echo "Build and push docker image..."
- docker build -f provider/schema-aws/build-aws/Dockerfile -t ${ECR_IMAGE} . - docker buildx create --driver docker-container --use
- docker tag ${ECR_IMAGE} ${ECR_IMAGE_BRANCH_LATEST} - docker buildx inspect --bootstrap
- echo "Pushing docker image..." - docker buildx build --platform linux/arm64/v8,linux/amd64 --pull --push -f provider/schema-aws/build-aws/Dockerfile -t ${ECR_IMAGE} -t ${ECR_IMAGE_BRANCH_LATEST} .
- docker push ${ECR_IMAGE}
- docker push ${ECR_IMAGE_BRANCH_LATEST}
- echo "Generate build-info.json" - echo "Generate build-info.json"
- | - |
......
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