2024-11-01 20:34:12 +01:00
|
|
|
ARG BUILD_FROM=ghcr.io/hassio-addons/base:16.3.4
|
|
|
|
# hadolint ignore=DL3006
|
|
|
|
FROM ${BUILD_FROM}
|
2024-11-01 17:25:52 +01:00
|
|
|
|
|
|
|
ENV LANG C.UTF-8
|
|
|
|
|
2024-11-01 21:29:05 +01:00
|
|
|
# Build arguments
|
|
|
|
ARG BUILD_ARCH
|
|
|
|
ARG BUILD_DATE
|
|
|
|
ARG BUILD_DESCRIPTION
|
|
|
|
ARG BUILD_NAME
|
|
|
|
ARG BUILD_REF
|
|
|
|
ARG BUILD_REPOSITORY
|
|
|
|
ARG BUILD_VERSION
|
|
|
|
ARG ACT_RUNNER_VERSION="0.2.11"
|
|
|
|
|
2024-11-01 20:34:12 +01:00
|
|
|
# Copy root filesystem
|
|
|
|
COPY rootfs /
|
2024-11-01 17:25:52 +01:00
|
|
|
|
|
|
|
# Install necessary dependencies
|
2024-11-03 10:58:42 +01:00
|
|
|
RUN apk add --no-cache git docker-cli python3 py3-pip nodejs npm sshpass
|
2024-11-01 21:29:05 +01:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2024-11-01 17:43:35 +01:00
|
|
|
# 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
|
2024-11-01 17:25:52 +01:00
|
|
|
|
2024-11-01 20:39:30 +01:00
|
|
|
RUN chmod +x /etc/s6-overlay/s6-rc.d/actrunner/*
|
2024-11-01 17:25:52 +01:00
|
|
|
|
|
|
|
# Labels
|
|
|
|
LABEL \
|
|
|
|
io.hass.name="Act Runner" \
|
|
|
|
io.hass.description="Gitea act runner" \
|
|
|
|
io.hass.arch="${BUILD_ARCH}" \
|
|
|
|
io.hass.type="addon" \
|
|
|
|
io.hass.version="v0.0.0"\
|
|
|
|
maintainer="feres mezned" \
|
|
|
|
org.opencontainers.image.title="Act runner" \
|
|
|
|
org.opencontainers.image.description="Gitea act runner" \
|
|
|
|
org.opencontainers.image.vendor="Home Assistant Local Add-ons" \
|
|
|
|
org.opencontainers.image.authors="Feres MEZNED" \
|
|
|
|
org.opencontainers.image.licenses="NO" \
|
|
|
|
org.opencontainers.image.url="https://mezgit.duckdns.org/mezned/HAddons" \
|
|
|
|
org.opencontainers.image.source="https://mezgit.duckdns.org/mezned/HAddons/gitea_act_runner"
|
2024-11-01 20:34:12 +01:00
|
|
|
|