From 5570aeb98fa1628273d937a403c0401c77d60b8d Mon Sep 17 00:00:00 2001 From: CAT <14349453+ihexon@users.noreply.github.com> Date: Wed, 18 Dec 2024 01:00:13 -0800 Subject: [PATCH] chore(dockerfile): add dockerfile (#40) # Using dockerfile build bootable-arm64.img Build `bootable-arm64.img` need `kpartx` device mapping which requires root privileges : ``` $ docker build -t ubuntu-noble-build . $ docker run -it --privileged -v ./output:/root/MkRoot/output ubuntu-noble-build ``` --- Dockerfile | 13 +++++++++++++ README.md | 8 ++++++++ 2 files changed, 21 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..abbbebc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM ubuntu:noble + +ARG http_proxy +ARG https_proxy +ARG no_proxy + +WORKDIR /root/MkRoot + +COPY ./ /root/MkRoot/ +RUN apt-get update && apt-get install -y sudo && rm -rf /var/lib/apt/lists/* + +CMD ["./make", "macos_arm64"] + diff --git a/README.md b/README.md index d3d7684..cdcea34 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,11 @@ - `SKIP_BUILD_PROOT=true`: Skip build [proot](https://github.com/proot-me/proot) - `SKIP_APT_GET_INSTALL=true`: Skip `apt update && apt install -y required package` - `VM_PROVIDER=qemu`: using qemu as vm provider + + +## Dockerfile +```bash +docker build -t ubuntu-noble-build . +# Only if you need proxy +docker build --build-arg http_proxy=http://192.168.1.250:2020 --build-arg https_proxy=http://192.168.1.250:2020 -t ubuntu-noble-build . +```