-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
67 lines (55 loc) · 2.87 KB
/
Containerfile
File metadata and controls
67 lines (55 loc) · 2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# --------------------------------------------------------------------------
# THIS FILE IS AUTOGENERATED - DO NOT EDIT MANUALLY
#
# Source: Containerfile.j2
# --------------------------------------------------------------------------
ARG BASE_VERSION=15
FROM ghcr.io/daemonless/nginx-base:${BASE_VERSION}
ARG FREEBSD_ARCH=amd64
ARG PKG_NAME=smokeping
ARG HEALTHCHECK_ENDPOINT="http://localhost:80/daemonless-ping"
ENV HEALTHCHECK_URL="${HEALTHCHECK_ENDPOINT}"
# --- Metadata (Injected by Generator) ---
LABEL org.opencontainers.image.title="SmokePing" \
org.opencontainers.image.description="Network latency monitor with historical graphing — tracks round-trip times and packet loss to your hosts over time." \
org.opencontainers.image.source="https://github.com/daemonless/smokeping" \
org.opencontainers.image.url="https://oss.oetiker.ch/smokeping/" \
org.opencontainers.image.documentation="https://oss.oetiker.ch/smokeping/doc/smokeping.en.html" \
org.opencontainers.image.licenses="GPL-2.0-or-later" \
org.opencontainers.image.vendor="daemonless" \
org.opencontainers.image.authors="daemonless" \
io.daemonless.category="Utilities" \
io.daemonless.port="80" \
io.daemonless.volumes="/config,/data" \
io.daemonless.arch="${FREEBSD_ARCH}" \
io.daemonless.pkg-name="${PKG_NAME}" \
io.daemonless.healthcheck-url="${HEALTHCHECK_ENDPOINT}"
# Install from FreeBSD packages
RUN pkg update && \
pkg install -y ${PKG_NAME} fcgiwrap spawn-fcgi && \
SMOKEPING_VERSION=$(pkg info ${PKG_NAME} | sed -n 's/.*Version.*: *//p') && \
mkdir -p /app && echo "$SMOKEPING_VERSION" > /app/version && \
pkg clean -ay && \
rm -rf /var/cache/pkg/* /var/db/pkg/repos/*
# Create required directories with proper permissions for traversal
RUN mkdir -p /var/lib/smokeping/data /var/lib/smokeping/images \
/var/run/smokeping /var/log/smokeping /data && \
chmod 755 /var/lib /var/lib/smokeping /var/lib/smokeping/data /var/lib/smokeping/images /data && \
chown -R bsd:bsd /var/lib/smokeping /var/run/smokeping /var/log/smokeping /data && \
# Create symlink for source-build path compatibility
mkdir -p /usr/local/smokeping && \
ln -sf /usr/local/etc/smokeping /usr/local/smokeping/etc
# Copy configuration and service scripts
COPY root/ /
# Use pkg service script
COPY root/etc/services.d/smokeping/run.pkg /etc/services.d/smokeping/run
# Make scripts executable
RUN chmod +x /etc/cont-init.d/* /etc/services.d/*/run 2>/dev/null || true
# Set up s6 service links for smokeping and fcgiwrap
RUN mkdir -p /run/s6/services/smokeping /run/s6/services/fcgiwrap && \
ln -sf /etc/services.d/smokeping/run /run/s6/services/smokeping/run && \
ln -sf /etc/services.d/fcgiwrap/run /run/s6/services/fcgiwrap/run
# --- Expose (nginx listens on 80) ---
EXPOSE 80
# --- Volumes (Injected by Generator) ---
VOLUME /config /data