This commit is contained in:
ai-dev
2024-11-01 21:29:05 +01:00
parent d7aa564769
commit 3201e0b9e6
6 changed files with 41 additions and 33 deletions

View File

@ -4,19 +4,6 @@ FROM ${BUILD_FROM}
ENV LANG C.UTF-8
# Copy root filesystem
COPY rootfs /
# Install necessary dependencies
RUN apk add --no-cache git docker-cli python3 py3-pip && \
curl -s https://raw.githubusercontent.com/nektos/act/master/install.sh | bash
RUN adduser -s /bin/false -D -H actrunner
# Create a directory for the virtual environment and install Ansible inside it
RUN python3 -m venv /opt/ansible-venv && \
/opt/ansible-venv/bin/pip install --no-cache-dir ansible
RUN chmod +x /etc/s6-overlay/s6-rc.d/actrunner/*
# Build arguments
ARG BUILD_ARCH
ARG BUILD_DATE
@ -25,6 +12,24 @@ ARG BUILD_NAME
ARG BUILD_REF
ARG BUILD_REPOSITORY
ARG BUILD_VERSION
ARG ACT_RUNNER_VERSION="0.2.11"
# Copy root filesystem
COPY rootfs /
# Install necessary dependencies
RUN apk add --no-cache git docker-cli python3 py3-pip
# Download and rename the act_runner binary
RUN curl -L -o /usr/local/bin/act_runner https://gitea.com/gitea/act_runner/releases/download/v${ACT_RUNNER_VERSION}/act_runner-${ACT_RUNNER_VERSION}-linux-${BUILD_ARCH} && \
chmod +x /usr/local/bin/act_runner
# Create a directory for the virtual environment and install Ansible inside it
RUN python3 -m venv /opt/ansible-venv && \
/opt/ansible-venv/bin/pip install --no-cache-dir ansible
RUN chmod +x /etc/s6-overlay/s6-rc.d/actrunner/*
RUN chmod +x /etc/s6-overlay/s6-rc.d/init-actrunner/*
# Labels
LABEL \