ripe-atlas-software-probe
ripe-atlas-software-probe copied to clipboard
Run software probe in a Docker container
I figured out how to run the software probe inside a Docker container. I'm posting the procedure here in case it's useful for others.
-
Build the container image with this Dockerfile:
FROM centos:8 WORKDIR /root RUN echo 'assumeyes=1' >> /etc/yum.conf && \ yum update && \ yum install git tar rpm-build openssl-devel autoconf automake libtool make RUN git clone --recursive --depth=1 https://github.com/RIPE-NCC/ripe-atlas-software-probe.git && \ ripe-atlas-software-probe/build-config/centos/bin/make-tars && \ rpmbuild --bb rpmbuild/SPECS/atlasswprobe.spec && \ mv rpmbuild/RPMS/x86_64/atlasswprobe-*.rpm ./ && \ rm -rf ripe-atlas-software-probe rpmbuild RUN yum -y install atlasswprobe-*.rpm VOLUME /var/atlas-probe/etc WORKDIR /var/atlas-probe CMD ["/usr/local/atlas/bin/ATLAS"]
Build command is:
docker build -t atlas-probe .
-
Start the container with this command:
docker run -d --name atlas-probe \ --restart always \ --cpus 0.03 --memory 64M \ atlas-probe
-
View public key with this command:
docker exec atlas-probe cat /var/atlas-probe/etc/probe_key.pub
-
To enable IPv6, follow this guide including the
docker-ipv6nat
step.
The probe connects, and can automatically reconnect using the same SSH key after the host machine reboots.
There are a few errors in docker logs atlas-probe
, but they seem to be harmless.
Command to build a container from RPM packages:
echo '
FROM centos:7
ADD https://ftp.ripe.net/ripe/atlas/software-probe/centos7/x86_64/atlasswprobe-5020-1.el7.x86_64.rpm /
RUN echo assumeyes=1 >> /etc/yum.conf && \
yum update && \
yum -y install /atlasswprobe-*.rpm && \
rm -rf /var/cache/yum /atlasswprobe-*.rpm
VOLUME /var/atlas-probe/etc
WORKDIR /var/atlas-probe
CMD ["/usr/local/atlas/bin/ATLAS"]
' | docker build -t atlas-probe -