5 Commits

Author SHA1 Message Date
258b6f3041 - In the ISL popup:
- Add line shading,
  - Remove table border,
- Add Rx3 in the superviosr HTML footer.
2026-02-16 08:52:55 +01:00
73ef6b46d5 - Add header to supervisor ISL popup,
- Minor font and color fixes to ISL popup.
2026-02-14 12:20:17 +01:00
448c084b2f - Add ISL support,
- Add ISL display to supervisor HTTPD status page,
- Add SERVER_SV_HTTPD_ENABLED env variable,
- Use now supervisor 4.3.0,
- Use now rx3-docker/base:1.4.0-mga9 image,
- Rebuild for updates.
2026-02-13 19:23:39 +01:00
dbb5451c01 - Use now rx3-docker/base:1.3.6-mga9 image,
- Rebuild for updates.
2025-11-28 10:41:36 +01:00
d277b03f14 - Update myip to 1.2.0,
- Use now rx3-docker/base:1.3.4-mga9 image,
- Remove stupid /var/log/README broken link,
- Rebuild for updates.
2025-09-19 19:00:00 +02:00
5 changed files with 229 additions and 43 deletions

View File

@@ -9,6 +9,7 @@ ARG IMG_NAME
ARG IMG_NAME_FULL
ARG IMG_VERSION
ARG IMG_MAINTAINER
ARG IMG_URL
LABEL org.rx3.${IMG_NAME}.name=${IMG_NAME_FULL}
LABEL org.rx3.${IMG_NAME}.version=${IMG_VERSION}
@@ -27,6 +28,112 @@ ARG SERVER_DNSMASQ_INI=/etc/supervisord.d/dnsmasq.ini
ARG SERVER_DNSMASQ_CONF=/etc/dnsmasq.conf
ARG SERVER_RESOLV_CONF=/etc/resolv.conf
ARG SERVER_SV_INI=/etc/supervisord.d/supervisord.ini
ARG SERVER_SV_HTTPD_INI=/etc/supervisord.d/supervisord-httpd.ini
ARG SERVER_SV_HTTPD_PAGE=/usr/lib/python3.10/site-packages/supervisor/ui/status.html
ARG SERVER_SV_HTTPD_CSS=/usr/lib/python3.10/site-packages/supervisor/ui/stylesheets/supervisor.css
#-----------------------------------------------------------------------------------------------------------------------
ARG SERVER_SV_HTML_IMG_B='status" />'
#-----------------------------------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------------------------------
ARG SERVER_SV_HTML_IMG_A='status"/> \n\
<div id="isl">IMG_NAME_VERSION \n\
<div id="isl-tab"> \n\
<table> \n\
<thead> \n\
<tr> \n\
<th>Id</th> \n\
<th>Date</th> \n\
<th>Time</th> \n\
<th>Registry</th> \n\
<th>Image</th> \n\
<th>Tag</th> \n\
</tr> \n\
</thead> \n\
<tbody> \n\
IMG_STACK_LOG \n\
</tbody> \n\
</table> \n\
</div> \n\
</div>'
#-----------------------------------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------------------------------
ARG SERVER_SV_HTML_VERSION_B='version">#</span>'
#-----------------------------------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------------------------------
ARG SERVER_SV_HTML_VERSION_A='version">#</span> + <a href="https://www.rx3.net/">Rx<sup>3</sup></a> Image Stack Log support'
#-----------------------------------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------------------------------
ARG SERVER_SV_CSS_HEADER_B='repeat-x;'
#-----------------------------------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------------------------------
ARG SERVER_SV_CSS_HEADER_A='repeat-x; \n\
display: flex; \n\
align-items: center; \n\
justify-content: space-between; \n\
font-size: 16px; \n\
font-weight: bold; \n\
} \n\
\n\
\#isl { \n\
position: relative; \n\
display: inline-block; \n\
cursor: pointer; \n\
} \n\
\n\
\#isl-tab { \n\
visibility: hidden; \n\
width: fit-content; \n\
background: #00000000; \n\
color: white; \n\
padding: 2px; \n\
border-radius: 4px; \n\
position: absolute; \n\
z-index: 1; \n\
top: 100%; \n\
right: 0; \n\
transform: none; \n\
opacity: 0; \n\
transition: opacity 0.3s; \n\
} \n\
\n\
\#isl:hover #isl-tab { \n\
visibility: visible; \n\
opacity: 1; \n\
} \n\
\n\
\#isl-tab table td, \n\
\#isl-tab table th { \n\
white-space: nowrap; \n\
padding: 4px 8px; \n\
border: 0px solid #666; \n\
font-size: 14px; \n\
} \n\
\n\
\#isl-tab table th { \n\
background: #333; \n\
} \n\
\n\
\#isl-tab table { \n\
border-collapse: collapse; \n\
width: fit-content; \n\
max-width: 500px; \n\
overflow-x: auto; \n\
'
#-----------------------------------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------------------------------
@@ -57,27 +164,31 @@ do
done'
#-----------------------------------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------------------------------
ARG CROND='#!/bin/bash \n\
\n\
\n\
if [[ "${SERVER_CROND_ENABLED}" != "TRUE" ]] \n\
then \n\
file_disenable "'${SERVER_CROND_INI}'" FALSE \n\
file_enable "'${SERVER_CROND_INI}'" FALSE \n\
else \n\
file_disenable "'${SERVER_CROND_INI}'" TRUE \n\
file_enable "'${SERVER_CROND_INI}'" TRUE \n\
fi'
#-----------------------------------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------------------------------
ARG DNSMASQ='#!/bin/bash \n\
\n\
\n\
if [[ "${SERVER_DNS_ENABLED}" != "TRUE" ]] \n\
then \n\
file_disenable "'${SERVER_DNSMASQ_INI}'" FALSE \n\
file_enable "'${SERVER_DNSMASQ_INI}'" FALSE \n\
else \n\
file_disenable "'${SERVER_DNSMASQ_INI}'" TRUE \n\
file_enable "'${SERVER_DNSMASQ_INI}'" TRUE \n\
\n\
cp '${SERVER_DNSMASQ_CONF}'.dist '${SERVER_DNSMASQ_CONF}' \n\
\n\
@@ -118,27 +229,35 @@ else
fi'
#-----------------------------------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------------------------------
ARG SUPERVISORD='#!/bin/bash \n\
\n\
if [[ "${SERVER_SV_HTTPD_ENABLED}" == "FALSE" ]] \n\
then \n\
file_enable "'${SERVER_SV_HTTPD_INI}'" FALSE \n\
else \n\
file_enable "'${SERVER_SV_HTTPD_INI}'" TRUE \n\
fi \n\
\n\
cp '${SERVER_SV_HTTPD_CSS}.ref' '${SERVER_SV_HTTPD_CSS}' \n\
cp '${SERVER_SV_HTTPD_PAGE}.ref' '${SERVER_SV_HTTPD_PAGE}' \n\
sed -i -e "s%IMG_NAME_VERSION%$(isl_top -i)%" '${SERVER_SV_HTTPD_PAGE}' \n\
sed -i -e "s%IMG_STACK_LOG%$(isl_html_dump -i)%" '${SERVER_SV_HTTPD_PAGE}' \n\
\n\
exec supervisord -c /etc/supervisord.conf'
#-----------------------------------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------------------------------
ARG SUPERVISORD_INI='[inet_http_server] \n\
port=*:'${SERVER_PORT_SV_INT}' \n\
\n\
[supervisord] \n\
nodaemon=true \n\
childlogdir='${SERVER_LOG_SV_DIR}' \n\
user=root'
#-----------------------------------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------------------------------
ARG CROND_INI='[program:crond] \n\
command=crond -n'
#-----------------------------------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------------------------------
ARG DNSMASQ_INI='[program:dnsmasq] \n\
command=dnsmasq -k'
@@ -146,8 +265,26 @@ command=dnsmasq -k'
RUN urpmi.update -a \
#-----------------------------------------------------------------------------------------------------------------------
ARG SUPERVISORD_INI='[supervisord] \n\
nodaemon=true \n\
childlogdir='${SERVER_LOG_SV_DIR}' \n\
user=root'
#-----------------------------------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------------------------------
ARG SUPERVISORD_HTTPD_INI='[inet_http_server] \n\
port=*:'${SERVER_PORT_SV_INT}
#-----------------------------------------------------------------------------------------------------------------------
RUN . /etc/profile.d/rx3.sh && isl_add ${IMG_URL} \
&& urpmi.update -a \
&& urpmi --force dnsmasq myip supervisor \
&& rm -f /var/log/README \
&& echo -e "${INIT_SHELL}" | sed -e "s/\`/'/g" -e 's/ *$//' > /usr/local/sbin/init.sh \
&& chmod a+x /usr/local/sbin/init.sh \
&& mkdir /etc/rc.d/rcD.d \
@@ -162,16 +299,27 @@ RUN urpmi.update -a
&& ln -s /etc/init.d/crond /etc/rcD.d/S60crond \
&& ln -s /etc/init.d/dnsmasq /etc/rcD.d/S65dnsmasq \
&& ln -s /etc/init.d/supervisord /etc/rcD.d/S99supervisord \
&& echo -e "${CROND_INI}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/supervisord.d/crond.ini \
&& echo -e "${DNSMASQ_INI}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/supervisord.d/dnsmasq.ini \
&& echo -e "${SUPERVISORD_INI}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/supervisord.d/supervisord.ini \
&& mv "${SERVER_DNSMASQ_CONF}" "${SERVER_DNSMASQ_CONF}.dist"
&& echo -e "${CROND_INI}" | sed -e "s/\`/'/g" -e 's/ *$//' > ${SERVER_CROND_INI} \
&& echo -e "${DNSMASQ_INI}" | sed -e "s/\`/'/g" -e 's/ *$//' > ${SERVER_DNSMASQ_INI} \
&& echo -e "${SUPERVISORD_INI}" | sed -e "s/\`/'/g" -e 's/ *$//' > ${SERVER_SV_INI} \
&& echo -e "${SUPERVISORD_HTTPD_INI}" | sed -e "s/\`/'/g" -e 's/ *$//' > ${SERVER_SV_HTTPD_INI} \
&& mv "${SERVER_DNSMASQ_CONF}" "${SERVER_DNSMASQ_CONF}.dist" \
&& mv "${SERVER_SV_HTTPD_PAGE}" "${SERVER_SV_HTTPD_PAGE}.ref" \
&& sed -i -e "s%${SERVER_SV_HTML_IMG_B}%${SERVER_SV_HTML_IMG_A}%" "${SERVER_SV_HTTPD_PAGE}.ref" \
&& sed -i -e "s%${SERVER_SV_HTML_VERSION_B}%${SERVER_SV_HTML_VERSION_A}%" "${SERVER_SV_HTTPD_PAGE}.ref" \
&& mv "${SERVER_SV_HTTPD_CSS}" "${SERVER_SV_HTTPD_CSS}.ref" \
&& sed -i -e "s/${SERVER_SV_CSS_HEADER_B}/${SERVER_SV_CSS_HEADER_A}/" "${SERVER_SV_HTTPD_CSS}.ref"
VOLUME ${SERVER_LOG_INIT_DIR}
VOLUME ${SERVER_LOG_SV_DIR}
EXPOSE ${SERVER_PORT_SV_INT}
CMD []
ENTRYPOINT ["init.sh"]

View File

@@ -5,15 +5,17 @@ Welcome to Rx3-Docker/Server docker image!
This project aims to build a Mageia server docker image to be used by other Rx3 packaging projects.
Features:
- Curtently based on rx3-docker/base:1.3.4-mga9 image,
- Curtently based on rx3-docker/base:1.4.0-mga9 image,
- Init script calling in order sub scripts in /etc/init.d & /etc/rcD.d,
- supervisord managing services,
- crond & logrotate configured & crond disabled by default,
- supervisord httpd configured and enabled by default,
- crond & logrotate configured with crond disabled by default,
- DNS forwarding support with dnsmasq, disabled by default,
- myip tool,
- Export init & supivisor log directories as volume.
Enjoy it!
Your Rx3 Team.

View File

@@ -1,3 +1,35 @@
------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/Server V 1.3.0 - A. GIBERT - 2026/02/16
------------------------------------------------------------------------------------------------------------------------------------
- Add ISL support,
- Add ISL display to supervisor HTTPD status page,
- Add SERVER_SV_HTTPD_ENABLED env variable,
- Use now supervisor 4.3.0,
- Use now rx3-docker/base:1.4.0-mga9 image,
- Rebuild for updates.
------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/Server V 1.2.7 - A. GIBERT - 2025/11/28
------------------------------------------------------------------------------------------------------------------------------------
- Use now rx3-docker/base:1.3.6-mga9 image,
- Rebuild for updates.
------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/Server V 1.2.6 - A. GIBERT - 2025/09/19
------------------------------------------------------------------------------------------------------------------------------------
- Update myip to 1.2.0,
- Use now rx3-docker/base:1.3.5-mga9 image,
- Rebuild for updates.
------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/Server V 1.2.5 - A. GIBERT - 2025/07/26
------------------------------------------------------------------------------------------------------------------------------------

View File

@@ -18,6 +18,7 @@ services:
IMG_NAME_FULL: ${IMG_NAME_FULL}
IMG_VERSION: ${IMG_VERSION}
IMG_MAINTAINER: ${IMG_MAINTAINER}
IMG_URL: ${IMG_URL}
IMG_FROM_URL: ${IMG_FROM_URL}
SERVER_LOG_INIT_DIR: ${SERVER_LOG_INIT_DIR}
@@ -32,6 +33,7 @@ services:
SERVER_DNS_DEFAULT: ${SERVER_DNS_DEFAULT}
SERVER_DNS_MAP: ${SERVER_DNS_MAP}
SERVER_DNS_SEARCH: ${SERVER_DNS_SEARCH}
SERVER_SV_HTTPD_ENABLED: ${SERVER_SV_HTTPD_ENABLED}
volumes:
- ./var/log/init:${SERVER_LOG_INIT_DIR}

View File

@@ -18,13 +18,13 @@ ORG_URL_PREFIX="${ORG_REGISTRY}/${ORG_NAME}"
IMG_NAME="server"
IMG_NAME_FULL="Rx3-Docker/Server Docker Image"
IMG_VERSION="1.2.5-mga9"
IMG_VERSION="1.3.0-mga9"
IMG_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>'
IMG_URL_PREFIX="${ORG_URL_PREFIX}"
IMG_URL="${IMG_URL_PREFIX}/${IMG_NAME}:${IMG_VERSION}"
IMG_FROM_URL="${ORG_URL_PREFIX}/base:1.3.4-mga9"
IMG_FROM_URL="${ORG_URL_PREFIX}/base:1.4.0-mga9"
@@ -43,9 +43,11 @@ SERVER_PORT_SV_INT=9001
SERVER_LOG_INIT_DIR="/var/log/init"
SERVER_LOG_SV_DIR="/var/log/supervisor"
SERVER_SV_HTTPD_ENABLED="TRUE"
SERVER_CROND_ENABLED="FALSE"
SERVER_DNS_ENABLED="FALSE"
SERVER_DNS_DEFAULT="1.1.1.1"
SERVER_DNS_MAP="rx3:10.0.0.1 10.in-addr.arpa:10.0.0.1 168.192.in-addr.arpa:10.0.0.1"
SERVER_DNS_SEARCH="xor.rx3 and.rx3 not.rx3 mob.rx3 fix.rx3 rx3 rx3.net"
SERVER_DNS_SEARCH="xor.rx3 and.rx3 nor.rx3 not.rx3 gw.rx3 mob.rx3 fix.rx3 vir.rx3 vpn.rx3 proto.rx3 rx3 rx3.net"