Skip to content

Commit

Permalink
Initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
mmastrac committed Feb 7, 2024
1 parent 4bf0168 commit f7f0fd7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM ubuntu
RUN apt update
RUN apt install -y debootstrap xz-utils
COPY make.sh /
RUN /make.sh
RUN tar -cv sysroot/ > /tmp/sysroot.tar
RUN xz -9 -e -z /tmp/sysroot.tar
RUN mv /tmp/sysroot.tar.xz /tmp/sysroot-`uname -m`.tar.xz
RUN ls -l /tmp/sysroot-`uname -m`.tar.xz
6 changes: 6 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
docker build . --platform linux/amd64 -t sysroot_amd64
docker build . --platform linux/arm64 -t sysroot_arm64

docker run --rm -it -v `pwd`:/output/ --platform linux/amd64 -t sysroot_amd64 sh -c "cp /tmp/sysroot-* /output/"
docker run --rm -it -v `pwd`:/output/ --platform linux/arm64 -t sysroot_arm64 sh -c "cp /tmp/sysroot-* /output/"
12 changes: 12 additions & 0 deletions make.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
if [[ `uname -m` == "aarch64" ]]; then
debootstrap \
--include=ca-certificates,curl,file,libc6-dev,make \
--no-merged-usr --variant=minbase xenial /sysroot \
http://ports.ubuntu.com/
else
debootstrap \
--include=ca-certificates,curl,file,libc6-dev,make \
--no-merged-usr --variant=minbase xenial /sysroot \
http://azure.archive.ubuntu.com/ubuntu
fi

0 comments on commit f7f0fd7

Please sign in to comment.