ecr-repo-creator

command module
v1.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

ecr-repo-creator

Small tool to create AWS ECR repository if missing, static build to have no dependencies.

There is also an example of Gitlab CI component that using it in glci-example ;-)

Usage

ecr-repo-creator [-region <region>] repo/to/create

As ecr-repo-creator rely on AWS SDK, authentication uses the following environment variables:

  • AWS_PROFILE or
  • AWS_SECRET_ACCESS_KEY/AWS_SESSION_TOKEN or
  • AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY

The default region is eu-west-1.

Repository can either be in the following form:

  • just the repository name: repository/name
  • full uri: 000000000000.dkr.ecr.eu-west-1.amazonaws.com/repository/name (see note)

[!CAUTION] Full uri is a convenient function and strips the *.amazonaws.com part, therefore neither accountId not region portion of the uri are used to determine the real target. Only the default (eu-west-1) or region flag will be used in conjunction to accountId, inferred from the provided credentials.

Dockerfile

The Dockerfile is a convenient way to add the tool to Kaniko build chain.

Build:

docker build -t new-build-image:latest .

Override the Kaniko version with --build-arg KANIKO_VERSION=<tag>: https://github.com/osscontainertools/kaniko/releases

Override the Golang version with --build-arg GOLANG_VERSION=<tag>: https://hub.docker.com/_/golang

A prebuilt image of kaniko with ecr-repo-creator, jq, envsubst and crane is available at ghcr.io/babs/kaniko-w-ecr-repo-creator

docker pull ghcr.io/babs/kaniko-w-ecr-repo-creator:1

Images are signed with cosign (keyless): the multi-arch index and every manifest under it. unsigned-staging is a CI scratch tag: never deploy it.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址