forked from artseyio/zmk-artsey
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve docker dev setups ; add rpi support ; the rpi stuff is compat…
…ible with docker and podmon
- Loading branch information
Showing
5 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
FROM ubuntu:latest as base | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
git \ | ||
wget \ | ||
autoconf \ | ||
automake \ | ||
build-essential \ | ||
bzip2 \ | ||
ccache \ | ||
device-tree-compiler \ | ||
dfu-util \ | ||
g++ \ | ||
gcc \ | ||
gcc-arm-none-eabi \ | ||
libtool \ | ||
make \ | ||
ninja-build \ | ||
cmake \ | ||
python3-dev \ | ||
python3-pip \ | ||
python3-setuptools \ | ||
xz-utils \ | ||
&& rm -rf /var/lib/apt/lists/* && apt-get clean | ||
|
||
FROM base as dev | ||
RUN apt-get update && apt-get install -y nano vim emacs tmux htop tio minicom \ | ||
&& pip3 install --user -U west \ | ||
&& rm -rf /var/lib/apt/lists/* && apt-get clean | ||
|
||
COPY bashrc tmp | ||
RUN mv /tmp/bashrc ~/.bashrc | ||
|
||
WORKDIR /workspaces | ||
|
||
ENV ZEPHYR_TOOLCHAIN_VARIANT=cross-compile | ||
ENV CROSS_COMPILE=/usr/bin/arm-none-eabi- | ||
|
||
CMD ["/bin/bash"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
docker run -it \ | ||
--name zmk-ardux-dev \ | ||
--network host \ | ||
--privileged \ | ||
-v /dev:/dev \ | ||
-v zmk:/workspaces/zmk \ | ||
-v ./:/workspaces/zmk-ardux \ | ||
-v ./.build:/workspaces/zmk/app/build \ | ||
zmk-ardux:latest \ | ||
/bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
docker volume create zmk | ||
|
||
cd .devcontainer | ||
|
||
docker build --network host -t zmk-ardux:latest -f ./Dockerfile.rpi | ||
|
||
docker run --rm \ | ||
--network host \ | ||
-v zmk:/workspaces/zmk \ | ||
zmk-ardux:latest \ | ||
/bin/bash -c "git clone https://github.com/zmkfirmware/zmk /workspaces/zmk/" | ||
|
||
docker run \ | ||
--name zmk-ardux-setup \ | ||
--network host \ | ||
-v zmk:/workspaces/zmk \ | ||
zmk-ardux:latest \ | ||
/bin/bash -c "source ~/.bashrc && cd /workspaces/zmk && west init -l app/ && west update && west zephyr-export && pip3 install --user -r zephyr/scripts/requirements-base.txt" | ||
|
||
docker commit zmk-ardux-setup zmk-ardux:latest | ||
|
||
docker rm -f zmk-ardux-setup | ||
|
||
cd .. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
docker commit zmk-ardux-setup zmk-ardux:latest |