Skip to content

Commit

Permalink
peerpod-ctl: fix libvirt-libs for multi-arch images for peerpod-ctl
Browse files Browse the repository at this point in the history
Fixes: #1432

Signed-off-by: Qi Feng Huo <[email protected]>
  • Loading branch information
Qi Feng Huo committed Sep 15, 2023
1 parent 1ec5c24 commit cd828c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/peerpod-ctrl_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
push:
branches:
- main
- huoqifeng/peerpod-ctl-img
paths:
- 'peerpod-ctrl/**'

Expand Down
5 changes: 4 additions & 1 deletion peerpod-ctrl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ COPY controllers/ controllers/
# CC=gcc because the cgo compiler will always be gcc in image golang-fedora, even for s390x and ppc64le
RUN CC=gcc CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build ${GOFLAGS} -a -o manager main.go

# Target Image
FROM --platform=$TARGETPLATFORM fedora:36
RUN if [ "$CGO_ENABLED" = 1 ] ; then dnf install -y libvirt-libs /usr/bin/ssh && dnf clean all; fi
ARG CGO_ENABLED=1

RUN if [ "$CGO_ENABLED" = 1 ] ; then dnf install -y libvirt-libs && dnf clean all; fi
WORKDIR /
COPY --from=builder /workspace/manager .

Expand Down

0 comments on commit cd828c4

Please sign in to comment.