Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions cmd/thv-operator/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,11 @@ tasks:
SHA:
sh: git rev-parse HEAD || echo "unknown"
REPO: '{{.REPO | default "ghcr.io/stacklok/toolhive"}}'
PLATFORM:
sh: echo "${PLATFORM:-linux/$(go env GOARCH)}"
cmds:
- >
eval "{{.CONTAINER_RUNTIME}} build --load
eval "{{.CONTAINER_RUNTIME}} build --platform={{.PLATFORM}} --load
-t {{.REPO}}/thv-operator:{{.SHA}}-ubi
--build-arg CODEDIR=cmd/thv-operator
--build-arg VERSION={{.SHA}}-ubi
Expand All @@ -386,9 +388,11 @@ tasks:
SHA:
sh: git rev-parse HEAD || echo "unknown"
REPO: '{{.REPO | default "ghcr.io/stacklok/toolhive"}}'
PLATFORM:
sh: echo "${PLATFORM:-linux/$(go env GOARCH)}"
cmds:
- >
eval "{{.CONTAINER_RUNTIME}} build --load
eval "{{.CONTAINER_RUNTIME}} build --platform={{.PLATFORM}} --load
-t {{.REPO}}/thv-proxyrunner:{{.SHA}}-ubi
--build-arg CODEDIR=cmd/thv-proxyrunner
--build-arg VERSION={{.SHA}}-ubi
Expand Down
6 changes: 3 additions & 3 deletions containers/operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ RUN CGO_ENABLED=0 LDFLAGS="-s -w \
-X github.com/stacklok/toolhive/pkg/versions.Commit=${COMMIT} \
-X github.com/stacklok/toolhive/pkg/versions.BuildDate=${BUILD_DATE} \
-X github.com/stacklok/toolhive/pkg/versions.BuildType=release" \
GOOS=linux GOARCH=amd64 go build -ldflags "${LDFLAGS}" -o main ./${CODEDIR}/main.go
go build -ldflags "${LDFLAGS}" -o main ./${CODEDIR}/main.go

# Use micro base image to package the binary
FROM --platform=linux/amd64 registry.access.redhat.com/ubi10/ubi-minimal:10.1-1763362715
# Use minimal base image to package the binary
FROM registry.access.redhat.com/ubi10/ubi-minimal:10.1-1763362715

COPY --from=builder /workspace/main /
COPY LICENSE /licenses/LICENSE
Expand Down
Loading