From 069a9cd05d6deac0538eaa920f5b33906d6aad33 Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Sun, 8 Jan 2023 17:40:17 +0100 Subject: [PATCH] started migration to podman --- README.md | 6 ++++++ mpd/Dockerfile | 2 +- mpd/Makefile | 37 +++++++++++++++++++++++-------------- 3 files changed, 30 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index ca34b39..35e79fd 100644 --- a/README.md +++ b/README.md @@ -35,3 +35,9 @@ docker buildx create --use ```sh docker run --rm --privileged multiarch/qemu-user-static --reset -p yes ``` + +or + +```sh + sudo podman run --rm --privileged multiarch/qemu-user-static --reset -p yes + ``` diff --git a/mpd/Dockerfile b/mpd/Dockerfile index a77bd2f..5afa0e2 100644 --- a/mpd/Dockerfile +++ b/mpd/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.16 +FROM alpine:3.17 RUN mkdir -p /var/lib/mpd && \ addgroup --gid 10001 mpd && \ diff --git a/mpd/Makefile b/mpd/Makefile index 09ddb13..b36b7d0 100644 --- a/mpd/Makefile +++ b/mpd/Makefile @@ -1,19 +1,28 @@ IMG_NAME = mpd -REGISTRY=registry.monotremata.xyz -IMG=$(REGISTRY)/$(IMG_NAME) -PLATFORMS=linux/arm64 +REGISTRY = registry.monotremata.xyz +IMG = $(REGISTRY)/$(IMG_NAME) +PLATFORM = linux/amd64,linux/arm64 +JOBS = 1 -.PHONY: build push buildx +.PHONY: build push -build: Dockerfile - docker build -t $(IMG) . -push: build - docker image push $(IMG) +out/image-name: Dockerfile + mkdir -p $(@D) + buildah build \ + --jobs=$(JOBS) \ + --platform=$(PLATFORM) \ + --manifest=$(IMG) . + @echo $(IMG) > $(@) -buildx: Dockerfile - docker buildx build \ - --platform $(PLATFORMS) \ - --tag $(IMG) \ - --push \ - . +#out/image-name: Dockerfile +# mkdir -p $(@D) +# podman build \ +# --manifest $(ING) \ +# --platform linux/amd64 \ +# --platform linux/arm64 \ +# . +# @echo $(IMG) > $(@) + +push: out/image-name + podman manifest push --all $(IMG) docker://$(IMG)