Nicer build
This commit is contained in:
parent
b3b8563b02
commit
5e07b55cd1
|
@ -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" ]
|
25
Dockerfile
25
Dockerfile
|
@ -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" ]
|
|
12
README.md
12
README.md
|
@ -47,7 +47,7 @@ Make your own image. Like so:
|
||||||
|
|
||||||
```Dockerfile
|
```Dockerfile
|
||||||
FROM git.woozle.org/neale/big-builder
|
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.
|
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:
|
Just something to bear in mind:
|
||||||
I spent a bit of time chasing this one down.
|
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?
|
|
||||||
|
|
Loading…
Reference in New Issue