Build and push a SOCI index in an alternative way.
- You do not need any other dependencies (such as containerd or zlib) installed.
- You can run this binary anywhere such as CodeBuild or Lambda.
This CLI is used in deploy-time-build
, a CDK construct to build and deploy a SOCI index on CDK deployment.
Pass 4 arguments to the CLI as below:
soci-wrapper REPOSITORY_NAME IMAGE_DIGEST AWS_REGION AWS_ACCOUNT
Sometimes (depending on AWS credential configuration) you will also have to set AWS_REGION
environment variable:
export AWS_REGION=us-west-2 # the region your ECR repository is located at
To build this project, you must install all the dependencies of soci-snapshotter.
go build
# or by docker
docker run --rm --platform linux/amd64 -v "$PWD":/app -w /app golang:1.22 bash -c \
"apt-get update && apt-get install -y zlib1g-dev && GOOS=linux GOARCH=amd64 go build -o soci-wrapper"
Most of the code is copied from cfn-ecr-aws-soci-index-builder project.