Compare commits

...

6 Commits

Author SHA1 Message Date
5a1d1443e0
fix: remove unreference COPY in Dockerfile 2025-04-02 22:55:18 +07:00
c77d5f0fa8
bump version to 5110 and remove patch 2025-04-02 22:53:09 +07:00
6f685070c2
fix: remove cross platform references(for now) 2025-03-15 14:08:36 +07:00
2e952f8366
add: cross platform and label on dev build 2025-03-15 13:54:04 +07:00
5d5f660d1b
add: dev image 2025-03-15 13:46:53 +07:00
Delta / Subo /Stefan
1e1c4add3c Update image-publish.yaml
update Actions
2025-03-15 13:37:26 +07:00
4 changed files with 55 additions and 26 deletions

View File

@ -0,0 +1,50 @@
#
name: Create and publish a Docker image
# Configures this workflow to run every time a change is pushed to the branch called `release`.
on:
push:
branches:
- master
workflow_dispatch:
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
build-and-push-image:
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
#
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get commit tag
id: repository
run: echo "tag=$(git describe --tags HEAD)" > $GITHUB_ENV
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
labels: ${{ steps.meta.outputs.labels }}
tags: |
ghcr.io/minoplhy/docker-ripe-atlas:dev

View File

@ -27,7 +27,7 @@ jobs:
uses: actions/checkout@v4
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
@ -35,14 +35,14 @@ jobs:
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
uses: docker/build-push-action@v6
with:
context: .
push: true

View File

@ -3,8 +3,6 @@ FROM alpine:3.21 as builder
LABEL image="ripe-atlas-builder"
ARG GIT_URL=https://github.com/RIPE-NCC/ripe-atlas-software-probe.git
COPY alpinelinux-fix-sys-reboot.patch /tmp/alpinelinux-fix-sys-reboot.patch
WORKDIR /
RUN apk update && \
@ -13,11 +11,8 @@ RUN apk update && \
RUN git clone --recursive "$GIT_URL" /tmp/ripe-atlas-software-probe
WORKDIR /tmp/ripe-atlas-software-probe
# version 5100
RUN git checkout 5100
# APPLY Alpine Linux specific patch
RUN git apply /tmp/alpinelinux-fix-sys-reboot.patch
# version 5110
RUN git checkout 5110
RUN autoreconf -iv
RUN ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib64 --runstatedir=/run --with-user=ripe-atlas --with-group=ripe-atlas --with-measurement-user=ripe-atlas --disable-systemd --enable-chown --enable-setcap-install

View File

@ -1,16 +0,0 @@
This patch is intended to fix reboot.h implict declaration issue when compile on Alpine Linux
Based on : https://github.com/RIPE-NCC/ripe-atlas-software-probe/pull/118
diff --git a/probe-busybox/networking/telnetd.c b/probe-busybox/networking/telnetd.c
index 543de5a..8a67651 100644
--- a/probe-busybox/networking/telnetd.c
+++ b/probe-busybox/networking/telnetd.c
@@ -134,6 +134,7 @@
#include <string.h>
#include <unistd.h>
#include <linux/reboot.h>
+#include <sys/reboot.h>
#define LOGIN_PREFIX "Atlas probe, see http://atlas.ripe.net/\r\n\r\n"
#define LOGIN_PROMPT " login: "