Go-OCI is a simple CLI tool for working with OCI (Open Container Initiative) registries. It allows you to:
- Push Docker images to OCI registries
- Create and push multi-architecture manifest lists
go install github.com/aldinokemal/go-oci@latestOr download a pre-built release
go-oci image:push <image:tag> [flags]
# Example
go-oci image:push localhost:5000/my-application:linux-arm64 --insecure=trueFlags:
--insecure, -i: Allow HTTP connections (default: false)--verbose, -v: Enable verbose logging (default: false)
go-oci manifest:push <image:tag> [flags]
# Example
go-oci manifest:push localhost:5000/my-application:latest --insecure=trueFlags:
--insecure, -i: Allow HTTP connections (default: false)--verbose, -v: Enable verbose logging (default: false)
go-oci manifest:create <image:tag> [flags]
# Example
go-oci manifest:create localhost:5000/my-application:latest \
--amend localhost:5000/my-application:linux-amd64 \
--amend localhost:5000/my-application:linux-arm64 \
--insecure=true \
--push=trueFlags:
--amend, -a: Add images to the manifest (required, can be specified multiple times)--insecure, -i: Allow HTTP connections (default: false)--push, -p: Push the manifest after creation (default: false)--verbose, -v: Enable verbose logging (default: false)
- Build multi-architecture Docker images:
# Build AMD64 image
docker buildx build \
--tag localhost:5000/my-application:linux-amd64 \
--platform linux/amd64 \
--load \
-f ./Dockerfile \
.
# Build ARM64 image
docker buildx build \
--tag localhost:5000/my-application:linux-arm64 \
--platform linux/arm64 \
--load \
-f ./Dockerfile \
.- Push images to the registry:
go-oci image:push localhost:5000/my-application:linux-amd64 --insecure=true
go-oci image:push localhost:5000/my-application:linux-arm64 --insecure=true- Create and push a multi-architecture manifest:
go-oci manifest:create localhost:5000/my-application:latest \
--amend localhost:5000/my-application:linux-amd64 \
--amend localhost:5000/my-application:linux-arm64 \
--insecure=true \
--push=true- Multi-architecture images in a Zot OCI registry:
