diff --git a/Dockerfile b/Dockerfile index d5da37e4..b37c939b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ FROM davidar/bootsh:stage1 AS build-stage2 FROM build-$TAG AS build COPY tarballs /src/tarballs WORKDIR /tmp -COPY configure bootsh/ +COPY configure Makefile bootsh/ COPY scripts bootsh/scripts COPY src bootsh/src COPY lib bootsh/lib @@ -45,6 +45,6 @@ COPY --from=kernel /bzImage / FROM scratch AS bootsh COPY --from=build /dest / -ENTRYPOINT [ "/sbin/init" ] +ENTRYPOINT [ "/bin/init" ] CMD [ "/bin/sh" ] -SHELL [ "/sbin/init", "/bin/sh", "-c" ] +SHELL [ "/bin/init", "/bin/sh", "-c" ] diff --git a/Dockerfile.sabotage b/Dockerfile.sabotage new file mode 100644 index 00000000..efcd7a7e --- /dev/null +++ b/Dockerfile.sabotage @@ -0,0 +1,18 @@ +FROM davidar/bootsh:latest AS stage0 +ADD https://github.com/sabotage-linux/sabotage.git /src +RUN /src/utils/boot-stage0.sh + +FROM stage0 AS stage0-amd64 +SHELL [ "/bin/linux64", "/bin/sh", "-c" ] +FROM stage0 AS stage0-386 +SHELL [ "/bin/linux32", "/bin/sh", "-c" ] +FROM stage0-$TARGETARCH AS stage1 + +RUN butch install stage1 +RUN /src/utils/clean-stage1.sh +RUN /src/utils/rebuild-stage1.sh +RUN rm -rf /src/build /src/logs /src/tarballs + +FROM scratch +COPY --from=stage1 / / +CMD [ "/bin/sh" ] diff --git a/Makefile b/Makefile index 8b5ac274..80b3c924 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ src/samu/samu: clean: rm -rf build lib/toybox/generated + $(MAKE) -C src/samu clean install: all scripts/install.sh diff --git a/scripts/install.sh b/scripts/install.sh index 1c082e47..33b7cce5 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -6,5 +6,5 @@ R="$DESTDIR$PREFIX" install -D -m 755 build/bootsh "$R/bin/sh" install -D -m 755 scripts/configure-musl.sh "$R/bin/configure-musl.sh" -install -D -m 755 scripts/init.sh "$R/sbin/init" +install -D -m 755 scripts/init.sh "$R/bin/init" install -D -m 755 scripts/wak.c "$R/bin/awk"