diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..68446bf --- /dev/null +++ b/Containerfile @@ -0,0 +1,27 @@ +FROM public.ecr.aws/debian/debian:stable AS base +RUN apt-get -y update; apt-get -y install --no-install-recommends \ + build-essential \ + podman \ + arduino \ + rsync \ + openssh-client \ + python3 \ + curl \ + git +COPY --from=big-builder:golang /opt/go /opt/go/ +RUN ln -s /opt/go/bin/* /usr/local/bin/ + +FROM base AS runner +RUN curl -L https://gitea.com/gitea/act_runner/archive/v0.2.6.tar.gz | gunzip | tar x -C /opt +RUN CGO_ENABLED=0 make -C /opt/act_runner build + +FROM base +COPY --from=runner /opt/act_runner/act_runner /usr/local/bin/ +RUN apt-get -y install \ + hugo +RUN apt-get -y install \ + uidmap +RUN useradd builder -md /app +USER builder +WORKDIR /app +ENTRYPOINT [ "/usr/local/bin/act_runner" ] diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index a4598b1..0000000 --- a/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -FROM alpine AS base -RUN apk --no-cache add \ - build-base \ - hugo \ - rsync \ - openssh-client \ - python3 \ - curl \ - ca-certificates \ - git -RUN curl -L https://go.dev/dl/go1.21.3.linux-armv6l.tar.gz | gunzip | tar x -C /opt -f - -RUN ln -s /opt/go/bin/* /usr/local/bin/ - - -FROM base AS runner-build -WORKDIR /src -RUN git clone https://gitea.com/gitea/act_runner -RUN CGO_ENABLED=0 make -C act_runner build - -FROM base -COPY --from=runner-build /src/act_runner/act_runner /usr/local/bin -RUN adduser -D builder -USER builder -WORKDIR /app -ENTRYPOINT [ "/usr/local/bin/act_runner" ] diff --git a/README.md b/README.md index fb2d686..1f7a341 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Make your own image. Like so: ```Dockerfile FROM git.woozle.org/neale/big-builder -RUN apk --no-cache add nethack +RUN apt-get -y install nethack ``` Even better, steal this one's Dockerfile and add stuff to it. @@ -65,13 +65,3 @@ This is a problem with the runner that they might fix one day. Just something to bear in mind: I spent a bit of time chasing this one down. - -Note To Self ------------- - -```sh -~/runner/run.sh -``` - -I think I did it this way to isolate it from the rest of the homelab swarm? -But then why not just make a new swarm? diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..f21a82e --- /dev/null +++ b/build.sh @@ -0,0 +1,6 @@ +#! /bin/sh + +set -e + +podman build --tag=git.woozle.org/neale/big-builder:1.1 -f Containerfile . +podman push git.woozle.org/neale/big-builder:1.1