From 1abeb5e6e9df1d3dac3000b6d145df1691b6db7a Mon Sep 17 00:00:00 2001
From: Erwin Ried <1091420+eried@users.noreply.github.com>
Date: Sat, 18 Apr 2020 13:36:38 +0200
Subject: [PATCH] Create dockerfile-nogit

dockerfile for compiling a local folder that contains the sourcecode, instead of pulling a fresh copy every time.

To prepare to compile Havoc in Windows/Linux/Mac Docker for example, in the path of the sourcecode:
    docker build -t portapack -f dockerfile-nogit .

And then:
    docker run -v ${PWD}:/havoc portapack

The bin file will be on the build directory now.
---
 dockerfile-nogit | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 dockerfile-nogit

diff --git a/dockerfile-nogit b/dockerfile-nogit
new file mode 100644
index 00000000..0f560b93
--- /dev/null
+++ b/dockerfile-nogit
@@ -0,0 +1,27 @@
+FROM ubuntu:latest
+
+# Set location to download ARM toolkit from.
+# This will need to be changed over time or replaced with a static link to the latest release.
+ENV ARMBINURL=https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2?revision=108bd959-44bd-4619-9c19-26187abf5225&la=en&hash=E788CE92E5DFD64B2A8C246BBA91A249CB8E2D2D \
+    PATH=$PATH:/opt/build/armbin/bin
+
+#Create volume /havoc/bin for compiled firmware binaries
+VOLUME /havoc
+WORKDIR /havoc/firmware
+
+# Fetch dependencies from APT
+RUN apt-get update && \
+	apt-get install -y git tar wget dfu-util cmake python3 python-pip && \
+	apt-get -qy autoremove
+
+RUN pip install pyyaml
+
+# Grab the GNU ARM toolchain from arm.com
+# Then extract contents to /opt/build/armbin/
+RUN mkdir /opt/build && cd /opt/build && \
+	wget -O gcc-arm-none-eabi $ARMBINURL && \
+	mkdir armbin && \
+	tar --strip=1 -xjvf gcc-arm-none-eabi -C armbin
+
+CMD cd .. && cd build && \
+    cmake .. && make firmware
\ No newline at end of file
-- 
GitLab