aboutsummaryrefslogtreecommitdiff
path: root/main/puzzle/neo/esp-neopuzzle/.devcontainer/Dockerfile
diff options
context:
space:
mode:
authorElwin Hammer <elwinhamer@gmail.com>2024-04-23 11:49:54 +0200
committerElwin Hammer <elwinhamer@gmail.com>2024-04-23 11:49:54 +0200
commit65f139edb2d3cfa055504e04cba266566fdfbf3b (patch)
treed0c19ceec58bb1df5ee03aa09b861b2bbbe5df31 /main/puzzle/neo/esp-neopuzzle/.devcontainer/Dockerfile
parent7b8d066223b9af513193020423b86c9f52234001 (diff)
ESP version of the neotrellis puzzle (first setup)
Diffstat (limited to 'main/puzzle/neo/esp-neopuzzle/.devcontainer/Dockerfile')
-rw-r--r--main/puzzle/neo/esp-neopuzzle/.devcontainer/Dockerfile47
1 files changed, 47 insertions, 0 deletions
diff --git a/main/puzzle/neo/esp-neopuzzle/.devcontainer/Dockerfile b/main/puzzle/neo/esp-neopuzzle/.devcontainer/Dockerfile
new file mode 100644
index 0000000..1fe78dc
--- /dev/null
+++ b/main/puzzle/neo/esp-neopuzzle/.devcontainer/Dockerfile
@@ -0,0 +1,47 @@
+FROM espressif/idf
+
+ARG DEBIAN_FRONTEND=nointeractive
+ARG CONTAINER_USER=esp
+ARG USER_UID=1000
+ARG USER_GID=$USER_UID
+
+RUN apt-get update \
+ && apt install -y -q \
+ cmake \
+ git \
+ libglib2.0-0 \
+ libnuma1 \
+ libpixman-1-0 \
+ && rm -rf /var/lib/apt/lists/*
+
+# QEMU
+ENV QEMU_REL=esp_develop_8.2.0_20240122
+ENV QEMU_SHA256=e7c72ef5705ad1444d391711088c8717fc89f42e9bf6d1487f9c2a326b8cfa83
+ENV QEMU_DIST=qemu-xtensa-softmmu-${QEMU_REL}-x86_64-linux-gnu.tar.xz
+ENV QEMU_URL=https://github.com/espressif/qemu/releases/download/esp-develop-8.2.0-20240122/${QEMU_DIST}
+
+ENV LC_ALL=C.UTF-8
+ENV LANG=C.UTF-8
+
+RUN wget --no-verbose ${QEMU_URL} \
+ && echo "${QEMU_SHA256} *${QEMU_DIST}" | sha256sum --check --strict - \
+ && tar -xf $QEMU_DIST -C /opt \
+ && rm ${QEMU_DIST}
+
+ENV PATH=/opt/qemu/bin:${PATH}
+
+RUN groupadd --gid $USER_GID $CONTAINER_USER \
+ && adduser --uid $USER_UID --gid $USER_GID --disabled-password --gecos "" ${CONTAINER_USER} \
+ && usermod -a -G root $CONTAINER_USER && usermod -a -G dialout $CONTAINER_USER
+
+RUN chmod -R 775 /opt/esp/python_env/
+
+USER ${CONTAINER_USER}
+ENV USER=${CONTAINER_USER}
+WORKDIR /home/${CONTAINER_USER}
+
+RUN echo "source /opt/esp/idf/export.sh > /dev/null 2>&1" >> ~/.bashrc
+
+ENTRYPOINT [ "/opt/esp/entrypoint.sh" ]
+
+CMD ["/bin/bash", "-c"] \ No newline at end of file