From 953bab078e7fc5cbcc6d2944196336120adb62da Mon Sep 17 00:00:00 2001 From: Angus Trau Date: Thu, 3 Jan 2019 21:09:11 +1100 Subject: [PATCH 1/2] Add dockerfile --- Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6917204 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM ubuntu:trusty + +SHELL ["/bin/bash", "-c"] +RUN rm /bin/sh && ln -s /bin/bash /bin/sh +WORKDIR /keyplus + +# Install setup script dependencies +RUN apt-get update && apt-get install -y wget git unzip python3 python3-pip +RUN pip3 install --user -U setuptools +RUN ln -s /usr/bin/python3 /usr/bin/python +# Add files that the setup script expects without invalidating the entire cache +# Trick setup script into not installing submodules yet +RUN git init . +ADD env/ubuntu-14.04-setup.sh /keyplus/env/ubuntu-14.04-setup.sh +ADD host-software/keyplus/version.py /keyplus/host-software/keyplus/version.py +# Install keyplus environment +RUN cd /keyplus/env && bash ubuntu-14.04-setup.sh +RUN echo "source /keyplus/env/enter_env.sh" >> ~/.bashrc +# Remove dummy git repo +RUN rm -rf .git + +ADD . /keyplus +RUN git submodule update --init --recursive \ No newline at end of file From baa7c051114577fa2e25ad8f2ac0f7f59998bfa2 Mon Sep 17 00:00:00 2001 From: Angus Trau Date: Thu, 3 Jan 2019 22:05:36 +1100 Subject: [PATCH 2/2] Add docker instructions to readme --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index c9a480f..02efbe9 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,13 @@ In the drop down box at the top of the window, select "Layout". Click the "Brows TODO +### Docker +Clone this repository and run +``` +docker build -t keyplus . +docker run -it keyplus bash +``` + ## Building Currently building of the firmware has been tested on Linux.