From 3b8f043d5b25c77d8b215300e5b0da7fdad67b47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rcio=20Fernandes?= Date: Sat, 2 May 2026 11:44:22 +0000 Subject: [PATCH] teste --- .../buildkit-build-push-dev/action.yaml | 87 +++++++++++++++++++ .gitea/workflows/ssh-client-build-deploy.yaml | 8 +- fatboy-debian/Dockerfile | 68 +++++++++++++++ 3 files changed, 159 insertions(+), 4 deletions(-) create mode 100644 .gitea/actions/buildkit-build-push-dev/action.yaml create mode 100644 fatboy-debian/Dockerfile diff --git a/.gitea/actions/buildkit-build-push-dev/action.yaml b/.gitea/actions/buildkit-build-push-dev/action.yaml new file mode 100644 index 0000000..d68b65f --- /dev/null +++ b/.gitea/actions/buildkit-build-push-dev/action.yaml @@ -0,0 +1,87 @@ +name: BuildKit Build and push - dev +description: "Build and push images using remote Buildkit" +inputs: + registry_addr: + description: registry address + required: true + registry_username: + description: "registry username" + required: true + registry_password: + description: "registry password" + required: true + buildkit_addr: + description: "buildkit address" + required: true + tags: + description: "image tags / buildctl image name" + required: true + context: + description: "buildctl build context" + required: false + default: "." + dockerfile: + description: "buildctl build dockerfile/folder" + required: true + default: "." + filename: + description: "Docker file name (Default: Dockerfile)" + required: true + default: "Dockerfile" + build_args: + description: "Build arguments (multiline KEY=VALUE)" + required: false + default: "" +runs: + using: "composite" + steps: + - name: run buildctl build and push + shell: bash + run: | + ############################################### + # Create DOCKER_CONFIG for this pipeline + ############################################### + + DOCKER_CONFIG_DIR="${RUNNER_TEMP}/.buildctl_docker" + mkdir -p "$DOCKER_CONFIG_DIR" + + trap 'rm -rf "$DOCKER_CONFIG_DIR"' EXIT + + AUTH=$(printf "%s:%s" "${{ inputs.registry_username }}" "${{ inputs.registry_password }}" | base64 -w0) + + cat > "$DOCKER_CONFIG_DIR/config.json" <&1 - name: Build and push ssh-client container images - uses: ./.gitea/limbo_actions/buildkit-build-push + uses: ./.gitea/actions/buildkit-build-push-dev with: tags: git.limbosolutions.com/kb/ssh-client - registry_addr: ${{ vars.GITLIMBO_DOCKER_REGISTRY_ADDRESS }} - registry_username: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_USERNAME }} - registry_password: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_PASSWORD }} + registry_addr: ${{ vars.OCI_LIMBO_REGISTRY_ADDRESS }} + registry_username: ${{ secrets.OCI_LIMBO_REGISTRY_USERNAME }} + registry_password: ${{ secrets.OCI_LIMBO_REGISTRY_PASSWORD }} buildkit_addr: ${{ vars.BUILDKIT_ADDRESS }} dockerfile: ${{gitea.workspace}}/docker/ssh-client context: ${{gitea.workspace}}/docker/ssh-client diff --git a/fatboy-debian/Dockerfile b/fatboy-debian/Dockerfile new file mode 100644 index 0000000..94a6fbf --- /dev/null +++ b/fatboy-debian/Dockerfile @@ -0,0 +1,68 @@ +FROM ubuntu:22.04 + +ENV DEBIAN_FRONTEND=noninteractive + +# --------------------------------------------------------- +# Base dependencies +# --------------------------------------------------------- +RUN apt-get update && apt-get install -y \ + tini \ + curl \ + wget \ + jq \ + bash \ + tar \ + rsync \ + rclone \ + ansible \ + openssh-client \ + iptables \ + uidmap \ + slirp4netns \ + fuse-overlayfs \ + ca-certificates \ + && rm -rf /var/lib/apt/lists/* + +# --------------------------------------------------------- +# Install ACT Runner +# --------------------------------------------------------- +RUN curl -L https://dl.gitea.com/act_runner/0.6.0/act_runner-0.6.0-linux-amd64 \ + -o /usr/local/bin/act_runner && \ + chmod +x /usr/local/bin/act_runner + +# --------------------------------------------------------- +# Install kubectl +# --------------------------------------------------------- +RUN curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" && \ + chmod +x kubectl && mv kubectl /usr/local/bin/ + +# --------------------------------------------------------- +# Install Helm +# --------------------------------------------------------- +RUN HELM_VERSION=$(curl -s https://api.github.com/repos/helm/helm/releases/latest | jq -r .tag_name) && \ + curl -fsSL https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz -o helm.tar.gz && \ + tar -zxvf helm.tar.gz && \ + mv linux-amd64/helm /usr/local/bin/helm && \ + rm -rf linux-amd64 helm.tar.gz + +# --------------------------------------------------------- +# Install BuildKit (buildkitd + buildctl) +# --------------------------------------------------------- +ENV BUILDKIT_VERSION=v0.28.0 + +RUN curl -L "https://github.com/moby/buildkit/releases/download/${BUILDKIT_VERSION}/buildkit-${BUILDKIT_VERSION}.linux-amd64.tar.gz" \ + | tar -xz -C /usr/local/bin --strip-components=1 + +# --------------------------------------------------------- +# Install rootlesskit (required for BuildKit rootless) +# --------------------------------------------------------- +RUN curl -L https://github.com/rootless-containers/rootlesskit/releases/download/v1.1.1/rootlesskit-x86_64.tar.gz \ + | tar -xz -C /usr/local/bin + +# --------------------------------------------------------- +# Default entrypoint +# --------------------------------------------------------- + +WORKDIR /data +ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/bin/act_runner"] +CMD ["daemon", "--config", "/etc/act_runner/config.yaml"] \ No newline at end of file