mirror of
https://github.com/project-zot/zot.git
synced 2026-06-15 20:07:55 +08:00
build: fix build artifacts in binary
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
committed by
Ramkumar Chinchani
parent
63a75216ed
commit
d4307d96ac
@@ -11,19 +11,19 @@ OS ?= linux
|
|||||||
ARCH ?= amd64
|
ARCH ?= amd64
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: swagger binary binary-minimal exporter-minimal debug test test-clean check
|
all: swagger binary binary-minimal binary-debug exporter-minimal test test-clean check
|
||||||
|
|
||||||
.PHONY: binary-minimal
|
.PHONY: binary-minimal
|
||||||
binary-minimal: swagger
|
binary-minimal: swagger
|
||||||
env CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) go build -o bin/zot-minimal -tags minimal,containers_image_openpgp -v -trimpath -ldflags "-X github.com/project-zot/zot/pkg/api/config.Commit=${COMMIT} -X github.com/project-zot/zot/pkg/api/config.BinaryType=minimal -X github.com/project-zot/zot/pkg/api/config.GoVersion=${GO_VERSION} -s -w" ./cmd/zot
|
env CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) go build -o bin/zot-minimal -tags minimal,containers_image_openpgp -v -trimpath -ldflags "-X zotregistry.io/zot/pkg/api/config.Commit=${COMMIT} -X zotregistry.io/zot/pkg/api/config.BinaryType=minimal -X zotregistry.io/zot/pkg/api/config.GoVersion=${GO_VERSION} -s -w" ./cmd/zot
|
||||||
|
|
||||||
.PHONY: binary
|
.PHONY: binary
|
||||||
binary: swagger
|
binary: swagger
|
||||||
env CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) go build -o bin/zot -tags extended,containers_image_openpgp -v -trimpath -ldflags "-X github.com/project-zot/zot/pkg/api/config.Commit=${COMMIT} -X github.com/project-zot/zot/pkg/api/config.BinaryType=extended -X github.com/project-zot/zot/pkg/api/config.GoVersion=${GO_VERSION} -s -w" ./cmd/zot
|
env CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) go build -o bin/zot -tags extended,containers_image_openpgp -v -trimpath -ldflags "-X zotregistry.io/zot/pkg/api/config.Commit=${COMMIT} -X zotregistry.io/zot/pkg/api/config.BinaryType=extended -X zotregistry.io/zot/pkg/api/config.GoVersion=${GO_VERSION} -s -w" ./cmd/zot
|
||||||
|
|
||||||
.PHONY: debug
|
.PHONY: binary-debug
|
||||||
debug: swagger
|
binary-debug: swagger
|
||||||
env CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) go build -o bin/zot-debug -tags extended,containers_image_openpgp -v -gcflags all='-N -l' -ldflags "-X github.com/project-zot/zot/pkg/api/config.Commit=${COMMIT} -X github.com/project-zot/zot/pkg/api/config.BinaryType=extended -X github.com/project-zot/zot/pkg/api/config.GoVersion=${GO_VERSION}" ./cmd/zot
|
env CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) go build -o bin/zot-debug -tags extended,containers_image_openpgp -v -gcflags all='-N -l' -ldflags "-X zotregistry.io/zot/pkg/api/config.Commit=${COMMIT} -X zotregistry.io/zot/pkg/api/config.BinaryType=extended -X zotregistry.io/zot/pkg/api/config.GoVersion=${GO_VERSION}" ./cmd/zot
|
||||||
|
|
||||||
.PHONY: exporter-minimal
|
.PHONY: exporter-minimal
|
||||||
exporter-minimal: swagger
|
exporter-minimal: swagger
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ https://zotregistry.io
|
|||||||
* Supports container image signatures - [cosign](https://github.com/sigstore/cosign) and [notation](https://github.com/notaryproject/notation)
|
* Supports container image signatures - [cosign](https://github.com/sigstore/cosign) and [notation](https://github.com/notaryproject/notation)
|
||||||
* Supports [helm charts](https://helm.sh/docs/topics/registries/)
|
* Supports [helm charts](https://helm.sh/docs/topics/registries/)
|
||||||
* Behavior controlled via [configuration](./examples/README.md)
|
* Behavior controlled via [configuration](./examples/README.md)
|
||||||
|
* Supports `amd64` (Intel, AMD, etc) and `arm64` (ARM servers, Raspberry PI 4, etc) architectures
|
||||||
* Supports image deletion by tag
|
* Supports image deletion by tag
|
||||||
* Currently suitable for on-prem deployments (e.g. colocated with Kubernetes)
|
* Currently suitable for on-prem deployments (e.g. colocated with Kubernetes)
|
||||||
* Compatible with ecosystem tools such as [skopeo](#skopeo) and [cri-o](#cri-o)
|
* Compatible with ecosystem tools such as [skopeo](#skopeo) and [cri-o](#cri-o)
|
||||||
|
|||||||
+1
-1
@@ -129,7 +129,7 @@ func NewRootCmd() *cobra.Command {
|
|||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
if showVersion {
|
if showVersion {
|
||||||
log.Info().Str("distribution-spec", distspec.Version).Str("commit", config.Commit).
|
log.Info().Str("distribution-spec", distspec.Version).Str("commit", config.Commit).
|
||||||
Str("binary-type", config.BinaryType).Msg("version")
|
Str("binary-type", config.BinaryType).Str("go version", config.GoVersion).Msg("version")
|
||||||
}
|
}
|
||||||
_ = cmd.Usage()
|
_ = cmd.Usage()
|
||||||
cmd.SilenceErrors = false
|
cmd.SilenceErrors = false
|
||||||
|
|||||||
Reference in New Issue
Block a user