diff --git a/buildspec.yml b/buildspec.yml index d9b9e62..262728e 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -18,6 +18,12 @@ phases: - aws ecr create-repository --repository-name mrt-minio-it || echo 'ignore if exists...' - aws ecr create-repository --repository-name mrt-minio-it-with-content || echo 'ignore if exists...' + - aws ecr create-repository --repository-name callback || echo 'ignore if exists...' + - aws ecr create-repository --repository-name mrt-opendj || echo 'ignore if exists...' + - aws ecr create-repository --repository-name mrt-init || echo 'ignore if exists...' + - aws ecr create-repository --repository-name merritt-database || echo 'ignore if exists...' + + build: on-failure: ABORT commands: @@ -33,6 +39,15 @@ phases: - docker-compose -f mrt-inttest-services/mrt-minio-it/docker-compose.yml push - docker-compose -f mrt-inttest-services/mrt-minio-it-with-content/docker-compose.yml build - docker-compose -f mrt-inttest-services/mrt-minio-it-with-content/docker-compose.yml push + + - docker build --quiet --build-arg ECR_REGISTRY=${ECR_REGISTRY} --no-cache --force-rm -t ${ECR_REGISTRY}/mrt-database mrt-services/mysql + - docker push ${ECR_REGISTRY}/mrt-database + - docker build --quiet --build-arg ECR_REGISTRY=${ECR_REGISTRY} --no-cache --force-rm -t ${ECR_REGISTRY}/mrt-opendj mrt-services/ldap + - docker push ${ECR_REGISTRY}/mrt-opendj + - docker build --quiet --build-arg ECR_REGISTRY=${ECR_REGISTRY} --no-cache --force-rm -t ${ECR_REGISTRY}/mrt-init mrt-services/merritt-init + - docker push ${ECR_REGISTRY}/mrt-init + - docker build --quiet --build-arg ECR_REGISTRY=${ECR_REGISTRY} --no-cache --force-rm -t ${ECR_REGISTRY}/callback mrt-services/callback + - docker push ${ECR_REGISTRY}/callback post_build: commands: #- aws s3 rm s3://${S3CFBUCKET}/api --recursive diff --git a/mrt-services/callback/Dockerfile b/mrt-services/callback/Dockerfile index d5439c1..fdea5a5 100644 --- a/mrt-services/callback/Dockerfile +++ b/mrt-services/callback/Dockerfile @@ -6,7 +6,7 @@ # This image is intended to simulate an ALB fronting a Lambda # docker build -t cdluc3/simulate-lambda-alb . -FROM ruby:3 +FROM public.ecr.aws/docker/library/ruby:3 RUN apt-get update -y -qq && apt-get -y upgrade diff --git a/mrt-services/ldap/Dockerfile b/mrt-services/ldap/Dockerfile index 5eb8e22..ebb1ff8 100644 --- a/mrt-services/ldap/Dockerfile +++ b/mrt-services/ldap/Dockerfile @@ -1,5 +1,5 @@ # https://github.com/ghchinoy/forgerock-docker -FROM openjdk:11-jre-buster +FROM public.ecr.aws/docker/library/openjdk:11-jre-buster WORKDIR /opt diff --git a/mrt-services/opensearch/opensearch/Dockerfile b/mrt-services/opensearch/opensearch/Dockerfile index 567cf1f..51e3fdb 100644 --- a/mrt-services/opensearch/opensearch/Dockerfile +++ b/mrt-services/opensearch/opensearch/Dockerfile @@ -1,2 +1,2 @@ -FROM docker.io/opensearchproject/opensearch:latest +FROM public.ecr.aws/opensearchproject/opensearch:latest #COPY --chown=elasticsearch:elasticsearch ./elasticsearch.yml /usr/share/elasticsearch/config/ diff --git a/mrt-services/scratch/Dockerfile b/mrt-services/scratch/Dockerfile index 30cb4b3..f58397a 100644 --- a/mrt-services/scratch/Dockerfile +++ b/mrt-services/scratch/Dockerfile @@ -1,3 +1,3 @@ # Placeholder dockerfile that does noop - intended to be overridden -FROM alpine +FROM public.ecr.aws/docker/library/alpine CMD [ "echo", "This is a no-op placeholder for this container" ] \ No newline at end of file diff --git a/mrt-services/ui/Dockerfile b/mrt-services/ui/Dockerfile index 5ea8cdd..af9b828 100644 --- a/mrt-services/ui/Dockerfile +++ b/mrt-services/ui/Dockerfile @@ -5,7 +5,7 @@ # See https://itnext.io/docker-rails-puma-nginx-postgres-999cd8866b18 # docker build -t cdluc3/mrt-dashboard . -FROM ruby:3 +FROM public.ecr.aws/docker/library/ruby:3 RUN apt-get update -y -qq && apt-get install -y build-essential libpq-dev nodejs && apt-get -y upgrade # Set an environment variable where the Rails app is installed to inside of Docker image