equinixmetal-archive / csi-packet

Kubernetes CSI driver for Equnix Metal, formerly Packet
Apache License 2.0
25 stars 13 forks source link

Simplify Dockerfile and build and support cross #74

Closed deitch closed 4 years ago

deitch commented 4 years ago

This simplifies the Dockerfiles down to a single one, used across all architectures and builds (local or cross build).

Beforehand, we could build amd64 on amd64, and arm64 only on amd64, i.e. cross. This is fine for compiling the binary (go is wonderful in that respect), but images only worked with qemu and binfmt, which had issues with some of the CI systems, and was less than optimal.

With this change, we can build amd64 on amd64 (local), arm64 in amd64 (cross) or arm64 on arm64 (local).

When this is done, we will change drone.yml to do local builds, as they support native arm64 builds in their cloud. Of course, we still can do cross-builds, if we ever switch to something else, or they figure out how to support binfmt.