mirror of
https://github.com/minoplhy/docker-ripe-atlas.git
synced 2025-04-21 20:36:58 +00:00
Compare commits
12 Commits
5100-v4-al
...
master
Author | SHA1 | Date | |
---|---|---|---|
5a1d1443e0 | |||
c77d5f0fa8 | |||
6f685070c2 | |||
2e952f8366 | |||
5d5f660d1b | |||
|
1e1c4add3c | ||
f40339e1fb | |||
be9bbcd7b4 | |||
db5ba45a0c | |||
a13711e7f9 | |||
505a1334b7 | |||
317f3d1d6d |
50
.github/workflows/image-publish-dev.yaml
vendored
Normal file
50
.github/workflows/image-publish-dev.yaml
vendored
Normal 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
|
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@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
|
||||
|
12
Dockerfile
12
Dockerfile
@ -1,11 +1,8 @@
|
||||
## builder
|
||||
FROM alpine:3.21 as builder
|
||||
LABEL image="ripe-atlas-builder"
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
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 && \
|
||||
@ -14,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
|
||||
@ -32,7 +26,7 @@ COPY --from=builder /tmp/ripe-atlas-software-probe /
|
||||
|
||||
## the actual image
|
||||
FROM alpine:3.21
|
||||
LABEL maintainer="dockerhub@public.swineson.me"
|
||||
LABEL maintainer="c@3qx.nl"
|
||||
LABEL image="ripe-atlas"
|
||||
|
||||
COPY --from=builder /tmp/ripe-atlas-software-probe /tmp/ripe-atlas-software-probe
|
||||
|
15
README.md
15
README.md
@ -79,6 +79,21 @@ Note that building this container image requires [BuildKit](https://docs.docker.
|
||||
|
||||
If you are on older versions: Docker does not enable IPv6 by default. If you want IPv6 support, some level of setup and a basic understanding of IPv6 is required. Swarm mode & some Kubernetes implementation supports IPv6 too with extra configuration.
|
||||
|
||||
### IPv6 on Alpine Linux host
|
||||
|
||||
At the time of writing, `docker` package on Alpine Linux has problem connecting to outside of container on IPv6, this is caused by somehow docker package Alpine Linux doesn't set NAT routing on ip6tables, this could be fixed by
|
||||
|
||||
1. Add the following ip6tables rule directly:
|
||||
```shell
|
||||
ip6tables -t nat -A POSTROUTING -s <Docker IPv6 subnet>/64 -o <Internet Interface> -j MASQUERADE
|
||||
```
|
||||
2. if you're using AWALL add following in `private/`:
|
||||
```json
|
||||
"snat": [
|
||||
{ "src": ["<Docker IPv6 subnet>/64"], "out": "<Internet Interface>", "family" : "inet6" }
|
||||
],
|
||||
```
|
||||
|
||||
#### Using native address assignment
|
||||
|
||||
If you happened to have a block of static IPv6 addresses routed to your host, you can directly assign one of the addresses to the container. Edit `/etc/docker/daemon.json` and add native IPv6 address blocks, then restart the Docker daemon. An example:
|
||||
|
@ -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: "
|
@ -32,4 +32,10 @@ services:
|
||||
# - seccomp:unconfined
|
||||
networks:
|
||||
atlas-network:
|
||||
driver: bridge
|
||||
enable_ipv6: true
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 2001:db8:1:2::/64
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: atlas-network
|
||||
|
@ -18,6 +18,12 @@ mkdir -p /run/ripe-atlas/status
|
||||
chown -R ripe-atlas:ripe-atlas /run/ripe-atlas/status || true
|
||||
mkdir -p /etc/ripe-atlas
|
||||
chown -R ripe-atlas:ripe-atlas /etc/ripe-atlas || true
|
||||
|
||||
mkdir -p /var/spool/ripe-atlas/crons/7
|
||||
chown -R ripe-atlas:ripe-atlas /var/spool/ripe-atlas/crons/7 || true
|
||||
touch /run/ripe-atlas/pids/perd-7.pid.vol
|
||||
chown -R ripe-atlas:ripe-atlas /run/ripe-atlas/pids || true
|
||||
|
||||
#mkdir -p /var/atlas-probe/state
|
||||
#chown -R ripe-atlas:ripe-atlas /var/atlas-probe/state || true
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user