Simplifies collaboration and a better CLI for AWS ECR.
- Repository names are namespaced appropriately.
- Does not require everyone on team to learn mile-lengthy commands.
Here's a simple workflow:
- Edit your
Dockerfile nino build <aws-profile>will build the image using dockernino tag <aws-profile> latestwill tag the image withlatestand push it to ECR.
nino also allows other stuff, checkout the usage section below.
- docker
- AWS CLI
Set repo_name and dockerfile_path in .ninorc file in the project directory. Names of repositories created will be prefixed with the AWS profile name used. Here's a simple config:
repo_name=hello-world
# set it to whatever suits you
dockerfile_path=./aws/Dockerfile
The config file is a bash script. So feel free to use anything bash-friendly.
Most commands require the AWS profile name
# Add tag to a build
nino tag:add <aws-profile> <tag>
# Pushed tag
nino tag:push <aws-profile> <tag>
# Both `tag:add` and `tag:push`
nino tag <aws-profile> <tag>
# Build image
nino build <aws-profile>
# URL to the latest image in the repo
nino repo:image <aws-profile>
# AWS ECR repo info
nino repo:info <aws-profile>
# Create an ECR repository
nino repo:create <aws-profile>
# Delete the ECR repository
nino repo:delete <aws-profile>
# Display ECR repo host url
nino repo:host
Configure AWS CLI with your organization profile names. For synup, we would add the following AWS profiles on our development machines:
synup-production- for production IAM accountsynup-staging- for staging IAM accountsynup-akash- for company-provided personal IAM account (for development purposes)
This way the repositories created would be prefixed with names we can identify with. For example synup-staging-hello-world.