Build multi-arch images by default

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-05-30 23:25:56 -04:00
parent 0f20548386
commit d250b97b43
18 changed files with 226 additions and 206 deletions

View file

@ -17,17 +17,27 @@
# Use the 0.0 tag for testing, it shouldn't clobber any release builds
TAG ?= 0.0
HOSTARCH := $(shell uname -m | sed -e s/x86_64/amd64/ \
-e s/s390x/s390x/ \
-e s/armv7l/arm/ \
-e s/aarch64.*/arm64/)
ifndef ARCH
ARCH := $(HOSTARCH)
endif
ifeq ($(ARCH),)
$(error mandatory variable ARCH is empty)
endif
REGISTRY ?= ingress-controller
DOCKER ?= docker
IMGNAME = cfssl
IMAGE = $(REGISTRY)/$(IMGNAME)
IMAGE = $(REGISTRY)/cfssl
container:
$(DOCKER) buildx build \
image:
docker buildx build \
--load \
--platform linux/amd64 \
--platform $(ARCH) \
-t $(IMAGE):$(TAG) rootfs
clean:
$(DOCKER) rmi -f $(IMAGE):$(TAG) || true
docker rmi -f $(IMAGE):$(TAG) || true

View file

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM alpine:3.11
FROM alpine:3.12
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN apk add --no-cache \