From 2297f1b6e0ecc93fff7740730ae45f6d3c452ce5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tari=20Bal=C3=A1zs?= Date: Thu, 16 Apr 2026 22:03:20 +0200 Subject: [PATCH] - devcontainer: tic80 compiles and graphics runs, tested on linux --- .devcontainer/Dockerfile | 27 +++++++++++++++++++++++++++ .devcontainer/devcontainer.json | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..b5a78b9 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,27 @@ +FROM alpine:3.23 + +RUN apk update && apk add --no-cache \ + xeyes \ + jack \ + git \ + luarocks \ + mc \ + make \ + cmake \ + ruby \ + bash \ + curl \ + ca-certificates \ + g++ \ + pulseaudio \ + mesa-dev \ + mesa-gles \ + glu-dev + +RUN git clone --recursive --depth=1 https://github.com/nesbox/TIC-80.git /root/TIC-80 \ + && cd /root/TIC-80/build \ + && cmake -DBUILD_PRO=1 .. \ + && make -j$(nproc) \ + && make install + +CMD ["/bin/sh"] diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..ddde246 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,33 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/alpine +{ + "name": "Alpine Edge", + "build": { + "dockerfile": "Dockerfile" + }, + "mounts": [ + { + "source": "/tmp/.X11-unix", + "target": "/tmp/.X11-unix", + "type": "bind" + } + ], + "containerEnv": { + "DISPLAY": "${localEnv:DISPLAY}", + "PULSE_SERVER": "tcp:host.docker.internal:4713" + }, + "postCreateCommand": "if [ -n \"$WSL_DISTRO_NAME\" ]; then echo 'export DISPLAY=host.docker.internal:0.0' >> ~/.bashrc; fi" + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +}