Skip to content

Commit

Permalink
buildx to create container image and load in local registry. (#1938)
Browse files Browse the repository at this point in the history
`--platform linux/amd64,linux/arm64 --load` does not work because local docker registry can host different architectures

`$(GOOS)/$(GOARCH)` would also not work because causes an error pulling ubi image from redhat

```
ERROR: failed to solve: registry.access.redhat.com/ubi9/ubi-micro:latest: no match for platform in manifest: not found
```

Signed-off-by: pjuarezd <pjuarezd@users.noreply.github.com>
  • Loading branch information
pjuarezd committed Jan 11, 2024
1 parent 1c4bb96 commit 345f3cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ verify: getdeps govet lint
binary:
@CGO_ENABLED=0 GOOS=linux go build -trimpath --ldflags $(LDFLAGS) -o minio-operator ./cmd/operator

operator: assets binary
operator: binary

docker: operator
@docker buildx build --no-cache --platform linux/amd64,linux/arm64 -t $(TAG) .
@docker buildx build --no-cache --load --platform linux/$(GOARCH) -t $(TAG) .

build: regen-crd verify plugin operator docker

Expand Down

0 comments on commit 345f3cb

Please sign in to comment.