From 82b8f6755f8fb1121f3ed99f1f82e77d07dcf15a Mon Sep 17 00:00:00 2001 From: Krzysiek Egzmont Date: Sun, 1 Oct 2023 21:27:21 +0200 Subject: [PATCH] docker build script --- .gitignore | 1 + Dockerfile | 12 ++++++++++++ compile-with-docker.bat | 4 ++++ compile-with-docker.sh | 3 +++ 4 files changed, 20 insertions(+) create mode 100644 Dockerfile create mode 100644 compile-with-docker.bat create mode 100644 compile-with-docker.sh diff --git a/.gitignore b/.gitignore index 3ee9075..c58c39e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ firmware /firmware.packed.bin /firmware.bin +/compiled-firmware diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4b6c3f9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM archlinux:latest +RUN pacman -Syyu base-devel --noconfirm +RUN pacman -Syyu arm-none-eabi-gcc --noconfirm +RUN pacman -Syyu arm-none-eabi-newlib --noconfirm +RUN pacman -Syyu git --noconfirm +RUN pacman -Syyu python-pip --noconfirm +RUN pacman -Syyu python-crcmod --noconfirm +WORKDIR /app +COPY . . + +RUN git submodule update --init --recursive +#RUN make && cp firmware* compiled-firmware/ diff --git a/compile-with-docker.bat b/compile-with-docker.bat new file mode 100644 index 0000000..42adad1 --- /dev/null +++ b/compile-with-docker.bat @@ -0,0 +1,4 @@ +@echo off +docker build -t uvk5 . +docker run -v %CD%\compiled-firmware:/app/compiled-firmware uvk5 /bin/bash -c "cd /app && make clean && make && cp firmware* compiled-firmware/" +pause \ No newline at end of file diff --git a/compile-with-docker.sh b/compile-with-docker.sh new file mode 100644 index 0000000..fb5dd01 --- /dev/null +++ b/compile-with-docker.sh @@ -0,0 +1,3 @@ +#!/bin/sh +docker build -t uvk5 . +docker run -v $(PWD)/compiled-firmware:/app/compiled-firmware uvk5 /bin/bash -c "cd /app && make && cp firmware* compiled-firmware/" \ No newline at end of file