Build and Push Docker Image
Introduction
The goal of this section is to show how you can build a docker image and push it to ECR.
It does three basic things:
Logs in to AWS ECR using just-in-time (JIT) AWS credentials from Duplo
Builds and tags your docker image, with the tag based on the git commit SHA.
Pushes your docker image
Example Workflow
Here is an example CircleCI workflow that builds a docker image and pushes it to ECR.
To use it you will need to change following environment variables:
DOCKER_REPO
DOCKER_IMAGE_NAME
DUPLO_SERVICE_NAME
DOCKER_REPO
ECR_REGION
Above example of CircleCI requires DuploCloud utility shell script file which has to be checked in with your CircleCI file. This utility file can be found here: https://github.com/duplocloud/demo-npm-service/tree/master/.circleci
Last updated