From f8c7c44babc77a4173a0a74f6fe9748085f85e3f Mon Sep 17 00:00:00 2001 From: Jeff Lindsay Date: Tue, 3 Sep 2024 15:19:04 -0700 Subject: [PATCH] remove github-cli (too large), install go from download to avoid gcc dep (also too large) --- Makefile | 2 +- vm/Dockerfile | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 4871a45..62242fb 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ vm: rm -rf ./vm/image + rm -rf ./dist env86 create --with-guest --from-docker ./vm/Dockerfile ./vm/image env86 boot --cdp --cold --ttyS0 --save --no-console --exit-on="localhost:~#" ./vm/image - rm -rf ./dist env86 prepare ./vm/image ./dist \ No newline at end of file diff --git a/vm/Dockerfile b/vm/Dockerfile index 171550d..b20cbe1 100644 --- a/vm/Dockerfile +++ b/vm/Dockerfile @@ -8,11 +8,14 @@ RUN apk add openrc \ alpine-base \ agetty \ alpine-conf \ - github-cli \ git \ - go \ openssh +RUN wget https://go.dev/dl/go1.23.0.linux-386.tar.gz \ + && tar -C /usr/local -xzf go1.23.0.linux-386.tar.gz \ + && rm go1.23.0.linux-386.tar.gz \ + && ln -s /usr/local/go/bin/go /usr/bin/go + # Install mkinitfs from edge (todo: remove this when 3.19+ has worked properly with 9pfs) RUN apk add mkinitfs --no-cache --allow-untrusted --repository https://dl-cdn.alpinelinux.org/alpine/edge/main/ @@ -39,6 +42,7 @@ COPY ./guest86.service /etc/init.d/guest86 # there is a bug where it always crashes on first run RUN echo "rc-service guest86 start && rc-service guest86 stop && rc-service guest86 start" > /root/.profile + # https://wiki.alpinelinux.org/wiki/Alpine_Linux_in_a_chroot#Preparing_init_services RUN for i in devfs dmesg mdev hwdrivers; do rc-update add $i sysinit; done RUN for i in hwclock modules sysctl hostname bootmisc; do rc-update add $i boot; done