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 a24577f commit c7d7b40
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")
DOCKER := $(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 \
$(DOCKER) 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 .
$(DOCKER) build --tag zmk --file Dockerfile .

0 comments on commit c7d7b40

Please sign in to comment.