From a025a1a64ffee47b317bc8ddde4d170c5928b5ed Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Fri, 14 Oct 2022 17:54:35 -0700 Subject: [PATCH] more work --- README.md | 2 ++ build-all | 9 +++++---- cosmo-all/Dockerfile | 4 ++-- cosmo-chibicc/Dockerfile | 5 +++++ cosmo-lua/Dockerfile | 6 ++++++ cosmo-python/Dockerfile | 5 +++++ cosmo-sqlite/Dockerfile | 5 +++++ 7 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 cosmo-chibicc/Dockerfile create mode 100644 cosmo-lua/Dockerfile create mode 100644 cosmo-python/Dockerfile create mode 100644 cosmo-sqlite/Dockerfile diff --git a/README.md b/README.md index f5e3bdd..a15432c 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,8 @@ with some minor patches and a custom distrib. * **cosmo-chibicc:** chibicc (not sure which commit this is forked from) with many extensions. + * **cosmo-lua:** Actually Portable Lua + * **cosmo-python:** Actually Portable Python 3.6.14 * **cosmo-quickjs:** quickjs (2021-03-27) diff --git a/build-all b/build-all index a541f70..d8951de 100755 --- a/build-all +++ b/build-all @@ -48,10 +48,11 @@ build() { : \ && build cosmo-sed \ `# phase 4` \ && build cosmo-base \ - && echo build cosmo-chibicc \ - && echo build cosmo-python \ - && echo build cosmo-quickjs \ - && echo build cosmo-sqlite \ + && build cosmo-chibicc \ + && build cosmo-lua \ + && build cosmo-python \ + && build cosmo-quickjs \ + && build cosmo-sqlite \ && build cosmo-unbourne \ `# phase 5` \ && build cosmo-kuroko \ diff --git a/cosmo-all/Dockerfile b/cosmo-all/Dockerfile index b2436db..2c59d16 100644 --- a/cosmo-all/Dockerfile +++ b/cosmo-all/Dockerfile @@ -33,8 +33,8 @@ RUN --mount=type=cache,id=cosmo-build-all,target=/cosmopolitan/o,sharing=locked && ./makeit MODE="$mode" all \ \ # install the binaries somewhere so we can retrieve them without mounting cache: \ -#&& find o '(' -name '*.com' -o -name '*.com.dbg' ')' -exec \ - && find o -name '*.com' -exec \ + && find o '(' -name '*.com' -o -name '*.com.dbg' ')' \ + '!' -name '*_test.*' '!' -name 'test_*' -exec \ install -m0755 -t /usr/local/bin {} \ + \ ; diff --git a/cosmo-chibicc/Dockerfile b/cosmo-chibicc/Dockerfile new file mode 100644 index 0000000..9298d59 --- /dev/null +++ b/cosmo-chibicc/Dockerfile @@ -0,0 +1,5 @@ +FROM scratch as runner +COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox +COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape +COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/chibicc.* /bin/ +ENTRYPOINT ["/bin/ape", "/bin/chibicc.com"] diff --git a/cosmo-lua/Dockerfile b/cosmo-lua/Dockerfile new file mode 100644 index 0000000..5322db0 --- /dev/null +++ b/cosmo-lua/Dockerfile @@ -0,0 +1,6 @@ +FROM scratch as runner +COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox +COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape +COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/lua.* /bin/ +COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/luac.* /bin/ +ENTRYPOINT ["/bin/ape", "/bin/lua.com"] diff --git a/cosmo-python/Dockerfile b/cosmo-python/Dockerfile new file mode 100644 index 0000000..9b0601a --- /dev/null +++ b/cosmo-python/Dockerfile @@ -0,0 +1,5 @@ +FROM scratch as runner +COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox +COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape +COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/python.* /bin/ +ENTRYPOINT ["/bin/ape", "/bin/python.com"] diff --git a/cosmo-sqlite/Dockerfile b/cosmo-sqlite/Dockerfile new file mode 100644 index 0000000..1be31e6 --- /dev/null +++ b/cosmo-sqlite/Dockerfile @@ -0,0 +1,5 @@ +FROM scratch as runner +COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox +COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape +COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/sqlite.* /bin/ +ENTRYPOINT ["/bin/ape", "/bin/sqlite.com"]