mirror of
https://github.com/minoplhy/docker-ripe-atlas.git
synced 2025-04-21 20:36:58 +00:00
Compare commits
No commits in common. "master" and "5100-v6" have entirely different histories.
50
.github/workflows/image-publish-dev.yaml
vendored
50
.github/workflows/image-publish-dev.yaml
vendored
@ -1,50 +0,0 @@
|
||||
#
|
||||
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
|
6
.github/workflows/image-publish.yaml
vendored
6
.github/workflows/image-publish.yaml
vendored
@ -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@v3
|
||||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
|
||||
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@v5
|
||||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
|
||||
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@v6
|
||||
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
|
@ -3,6 +3,8 @@ 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 && \
|
||||
@ -11,8 +13,11 @@ RUN apk update && \
|
||||
RUN git clone --recursive "$GIT_URL" /tmp/ripe-atlas-software-probe
|
||||
|
||||
WORKDIR /tmp/ripe-atlas-software-probe
|
||||
# version 5110
|
||||
RUN git checkout 5110
|
||||
# version 5100
|
||||
RUN git checkout 5100
|
||||
|
||||
# APPLY Alpine Linux specific patch
|
||||
RUN git apply /tmp/alpinelinux-fix-sys-reboot.patch
|
||||
|
||||
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
|
||||
|
16
alpinelinux-fix-sys-reboot.patch
Normal file
16
alpinelinux-fix-sys-reboot.patch
Normal file
@ -0,0 +1,16 @@
|
||||
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: "
|
Loading…
x
Reference in New Issue
Block a user