Skip to content

Commit

Permalink
use ecr images, add to buildspec
Browse files Browse the repository at this point in the history
  • Loading branch information
terrywbrady committed Jun 25, 2024
1 parent 4e563d6 commit 4b3abc6
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 5 deletions.
15 changes: 15 additions & 0 deletions buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
2 changes: 1 addition & 1 deletion mrt-services/callback/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion mrt-services/ldap/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion mrt-services/opensearch/opensearch/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/
2 changes: 1 addition & 1 deletion mrt-services/scratch/Dockerfile
Original file line number Diff line number Diff line change
@@ -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" ]
2 changes: 1 addition & 1 deletion mrt-services/ui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4b3abc6

Please sign in to comment.