Skip to content

Commit

Permalink
Add support for using podman if docker is unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
craftyguy committed Oct 24, 2022
1 parent b13c301 commit 1ebf0f5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
TIMESTAMP := $(shell date -u +"%Y%m%d%H%M%S")
CONTAINER_CMD := $(shell { command -v docker || command -v podman; })

.PHONY: clean setup

Expand All @@ -10,11 +11,11 @@ clean:
rm ./firmware/*.uf2

firmware/%-left.uf2 firmware/%-right.uf2: config/adv360.keymap
docker run --rm -it --name zmk \
$(CONTAINER_CMD) run --rm -it --name zmk \
-v $(PWD)/firmware:/app/firmware \
-v $(PWD)/config:/app/config:ro \
-e TIMESTAMP=$(TIMESTAMP) \
zmk

setup: Dockerfile bin/build.sh config/west.yml
docker build --tag zmk --file Dockerfile .
$(CONTAINER_CMD) build --tag zmk --file Dockerfile .

0 comments on commit 1ebf0f5

Please sign in to comment.