summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReFil <31960031+ReFil@users.noreply.github.com>2022-10-26 09:44:55 +0000
committerGitHub <noreply@github.com>2022-10-26 09:44:55 +0000
commit2b7261c9dbe52c27a39aacd44761207b2206aa47 (patch)
treea53872bef742fc83aa29b3ee026bdc985cd3a2e2
parentb13c301b584818c1d6e98f0a17001b6ec8f4e05d (diff)
parent45ea621702839246bc28250174dc8e0b551cbc96 (diff)
Merge pull request #10 from craftyguy/podman
support using podman or docker
-rw-r--r--Dockerfile2
-rw-r--r--Makefile5
-rw-r--r--README.md4
3 files changed, 7 insertions, 4 deletions
diff --git a/Dockerfile b/Dockerfile
index e61dc54..bbb8e9f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM zmkfirmware/zmk-build-arm:stable
+FROM docker.io/zmkfirmware/zmk-build-arm:stable
WORKDIR /app
diff --git a/Makefile b/Makefile
index ea54d90..61c2131 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
TIMESTAMP := $(shell date -u +"%Y%m%d%H%M%S")
+DOCKER := $(shell { command -v podman || command -v docker; })
.PHONY: clean setup
@@ -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 .
diff --git a/README.md b/README.md
index c2878b5..258694e 100644
--- a/README.md
+++ b/README.md
@@ -12,10 +12,12 @@
1. Push a commit to trigger the build.
2. Download the artifact.
-## To build Firmware locally using Docker
+## To build Firmware locally using a container
### First run
+Note: Either Podman or Docker is required, Podman is preferred if both are present.
+
1. Execute `make all`.
2. Check the `firmware` directory for the latest firmware build.