diff options
| author | Shuhao Wu <shuhao@shuhaowu.com> | 2021-02-02 23:21:18 (GMT) |
|---|---|---|
| committer | Daniel Thompson <daniel@redfelineninja.org.uk> | 2021-02-20 08:44:22 (GMT) |
| commit | 268f8c06e9058338fe7a56051757efb3ddc19e33 (patch) | |
| tree | fbc5dcfea52b62a4f3841a1cb66978b6cc5da33a /tools | |
| parent | 090ed8489ba830879a8dfa094a05fc178020fa4f (diff) | |
Added Docker setup to build wasp-os.
This should make it a bit easier for people to contribute. Also fixed
the documentations on how to setup on Debian, as certain recommended
packages don't exist.
Signed-off-by: Shuhao Wu <shuhao@shuhaowu.com>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/docker/Dockerfile | 24 | ||||
| -rw-r--r-- | tools/docker/setup-env.sh | 3 | ||||
| -rwxr-xr-x | tools/docker/shell | 15 |
3 files changed, 42 insertions, 0 deletions
diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile new file mode 100644 index 0000000..96798f2 --- /dev/null +++ b/tools/docker/Dockerfile @@ -0,0 +1,24 @@ +FROM ubuntu:focal + +ARG uid +ARG gid + +RUN set -xe; \ + export DEBIAN_FRONTEND=noninteractive; \ + apt-get update; \ + apt-get install -y \ + wget git build-essential pkg-config libsdl2-2.0.0 python3-click \ + python3-numpy python3-pexpect python3-pil python3-pip python3-pydbus \ + libcairo2-dev python3-serial unzip python3-sphinx graphviz \ + python3-recommonmark python3-pytest \ + ; \ + pip3 install cbor pysdl2 pygobject cryptography; + +RUN set -xe; \ + wget --progress=dot:mega -O - https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 | tar xjf - -C /opt + +RUN set -xe; \ + addgroup --gid $gid user; \ + adduser --gecos "" --disabled-password --uid $uid --gid $gid user; + +COPY setup-env.sh /etc/profile.d/setup-env.sh diff --git a/tools/docker/setup-env.sh b/tools/docker/setup-env.sh new file mode 100644 index 0000000..f97b1f3 --- /dev/null +++ b/tools/docker/setup-env.sh @@ -0,0 +1,3 @@ +export PATH=/opt/gcc-arm-none-eabi-9-2019-q4-major/bin:$PATH + +cd ~/wasp-os diff --git a/tools/docker/shell b/tools/docker/shell new file mode 100755 index 0000000..01561b1 --- /dev/null +++ b/tools/docker/shell @@ -0,0 +1,15 @@ +#!/bin/bash + +docker build --build-arg uid=$UID --build-arg gid=$(id -g) -t wasp-os-dev ./tools/docker + +docker run \ + -v /tmp/.X11-unix:/tmp/.X11-unix:rw \ + -v $(pwd):/home/user/wasp-os \ + -u user \ + -e DISPLAY \ + --init \ + --device /dev/dri \ + -it \ + --rm \ + wasp-os-dev \ + bash -l |
