#syntax=docker/dockerfile:1.4 # see https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/syntax.md # see https://docs.docker.com/engine/reference/builder/#syntax # # SPDX-FileCopyrightText: © Vegard IT GmbH (https://vegardit.com) # SPDX-FileContributor: Sebastian Thomschke # SPDX-License-Identifier: Apache-2.0 # SPDX-ArtifactOfProjectHomePage: https://github.com/vegardit/docker-gitea-act-runner # # https://hub.docker.com/_/debian?tab=tags&name=stable-slim ###################### # runtime image base ###################### FROM debian:stable-slim as runtime-base-image LABEL maintainer="Vegard IT GmbH (vegardit.com)" USER root SHELL ["/bin/bash", "-c"] ARG BASE_LAYER_CACHE_KEY ARG DEBIAN_FRONTEND=noninteractive ARG LC_ALL=C RUN --mount=type=bind,source=.shared,target=/mnt/shared <> /etc/sudoers /mnt/shared/cmd/debian-cleanup.sh EOF ###################### # build image ###################### # https://hub.docker.com/_/python?tab=tags&name=3-slim FROM debian:stable-slim AS build-image USER root SHELL ["/bin/bash", "-c"] ARG BASE_LAYER_CACHE_KEY ARG DEBIAN_FRONTEND=noninteractive ARG LC_ALL=C ARG INSTALL_SUPPORT_TOOLS=0 ARG ACT_RUNNER_DOWNLOAD_URL=https://dl.gitea.com/act_runner/main/act_runner-main-linux-amd64 ARG UPX_COMPRESS=true RUN --mount=type=bind,source=.shared,target=/mnt/shared </opt/build_info cat /opt/build_info EOF COPY image/*.sh /opt/ COPY image/config.template.yaml /opt/ COPY .shared/lib/bash-init.sh /opt/bash-init.sh USER act VOLUME [ "/data" ] ENTRYPOINT ["/usr/bin/tini", "--"] CMD ["/bin/bash", "/opt/run.sh"]