From 66a4604185115d3b0d73923cd3254e82208298b1 Mon Sep 17 00:00:00 2001 From: axle Date: Tue, 29 Jul 2025 09:41:43 -0700 Subject: [PATCH] /fix : better docker added rom as native --- Dockerfile | 53 +++++++++++++++++++++++++++++------------------------ README.md | 4 ++-- 2 files changed, 31 insertions(+), 26 deletions(-) diff --git a/Dockerfile b/Dockerfile index a75375f88c..120c603f33 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,36 +1,41 @@ -FROM ubuntu:24.04 AS build +# Base image +FROM ubuntu:22.04 ENV TZ=UTC ENV LANG=C.UTF-8 -# Install Required Dependencies -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \ - apt-get update && apt-get install -y \ - curl \ +# Set timezone +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +# Install build dependencies +RUN apt-get update && apt-get install -y \ + make \ + git \ build-essential \ binutils-mips-linux-gnu \ - pkg-config \ + curl \ python3 \ python3-pip \ python3-venv \ - git \ - wget \ - unzip \ - vbindiff \ - vim \ - clang-tidy-14 \ - clang-format-14 \ - libpng-dev && \ - # Add source for practicerom-dev install - curl https://practicerom.com/public/packages/debian/pgp.pub | apt-key add - && \ - echo deb http://practicerom.com/public/packages/debian staging main >/etc/apt/sources.list.d/practicerom.list && \ - apt-get update && \ - apt-get install -y \ - practicerom-dev && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* + libpng-dev \ + libxml2-dev && \ + apt-get clean && rm -rf /var/lib/apt/lists/* + +# Set working directory to project +WORKDIR / + +# Optional: mark directory safe for git is that needed +RUN git config --global --add safe.directory /mm +# future after wget rom +RUN git clone https://github.com/zeldaret/mm.git + +# remove dependancies +# add volume for rom endpoint +WORKDIR /mm/baseroms/n64-us +COPY ./baseroms/n64-us/baserom.z64 . WORKDIR /mm -RUN git config --global --add safe.directory /mm +RUN make init -ENTRYPOINT ["/usr/bin/env", "bash", "-c"] +# Default entry (you may override in mcp config) +ENTRYPOINT ["/usr/bin/env", "bash"] diff --git a/README.md b/README.md index f6d28487c8..5bcaf3990b 100644 --- a/README.md +++ b/README.md @@ -201,8 +201,8 @@ Run the following in my current folder: ``` docker run -it --rm \ - --mount type=bind,source="$(pwd)",destination=/mm \ - mm /usr/bin/env bash + -v ./baseroms:/mm/baseroms \ + mm ``` Once inside, Claude can: