From 3c96eae1784c3f3f2834ef9ab9edd915c9f87878 Mon Sep 17 00:00:00 2001 From: nyyu Date: Thu, 26 Dec 2024 19:59:35 +0100 Subject: [PATCH] feat: debian --- .woodpecker.yml | 17 ++++++++++++++++- Dockerfile.debian | 9 +++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 Dockerfile.debian diff --git a/.woodpecker.yml b/.woodpecker.yml index 5f3de0f..52c76ce 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,5 +1,5 @@ steps: - docker: + docker-alpine: image: woodpeckerci/plugin-kaniko pull: true settings: @@ -13,3 +13,18 @@ steps: when: branch: ${CI_REPO_DEFAULT_BRANCH} event: [push, manual, tag] + docker-debian: + image: woodpeckerci/plugin-kaniko + pull: true + settings: + username: + from_secret: registry_username + password: + from_secret: registry_password + dockerfile: Dockerfile.debian + repo: ${CI_REPO_OWNER}/numcpu_override + registry: ${DOCKER_REGISTRY} + tags: debian + when: + branch: ${CI_REPO_DEFAULT_BRANCH} + event: [push, manual, tag] diff --git a/Dockerfile.debian b/Dockerfile.debian new file mode 100644 index 0000000..e1a53b2 --- /dev/null +++ b/Dockerfile.debian @@ -0,0 +1,9 @@ +FROM debian:stable +COPY . . +RUN apt update && apt install -y gcc && \ + gcc -shared -fPIC -Wall -Wextra -Werror numcpu_override.c -o numcpu_override.so -ldl + +FROM alpine:3.21 +COPY /copy.sh / +COPY --from=0 numcpu_override.so / +ENTRYPOINT ["/copy.sh"]