Skip to content

Create a new image

Yejun Su edited this page Apr 29, 2024 · 1 revision

Run the steps on your local machine.

Local auth in AWS ECR

If you receive an error using the AWS CLI, make sure that you have the latest version of the AWS CLI and Docker installed.

  1. Setup AWS key _id and secret
export AWS_ACCESS_KEY_ID=******
export AWS_SECRET_ACCESS_KEY=*****
export AWS_DEFAULT_REGION=ca-central-1
  1. Use the AWS CLI:
aws ecr get-login-password --region ca-central-1 | docker login --username AWS --password-stdin 561855203082.dkr.ecr.ca-central-1.amazonaws.com

Create docker image

You may replace latest with a specific Ruby version, such as ruby3.3.

  1. Build image
docker build -t openapply/circleci-with-prince .
  1. Tag image
docker tag openapply/circleci-with-prince:latest 561855203082.dkr.ecr.ca-central-1.amazonaws.com/openapply/circleci-with-prince:latest
  1. Push image
docker push 561855203082.dkr.ecr.ca-central-1.amazonaws.com/openapply/circleci-with-prince:latest
Clone this wiki locally