From 7606e571770061bf49a5727ed609403184cb0ac8 Mon Sep 17 00:00:00 2001 From: Maxim <55401893+Vatson112@users.noreply.github.com> Date: Tue, 9 Feb 2021 07:41:33 +0300 Subject: [PATCH] Chore: Add compatibility with podman for build task. (#4064) Change in Makefile for build with docker or podman via one interface. Also add error if no docker or podman installed. Co-authored-by: Maxim Albeschenko --- docker/Makefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docker/Makefile b/docker/Makefile index 3121317af..02bba0022 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -1,2 +1,13 @@ +HAVE_DOCKER := $(shell which docker 2>/dev/null) +HAVE_PODMAN := $(shell which podman 2>/dev/null) + build: - docker build -t nvim -f Dockerfile.nvim-python3 . +ifdef HAVE_DOCKER + docker build -t nvim -f Dockerfile.nvim-python3 . +else +ifdef HAVE_PODMAN + podman build -t nvim -f Dockerfile.nvim-python3 . +else + $(error "No docker or podman in $(PATH). Check if one was installed.") +endif +endif