Compare commits
3 Commits
server-mga
...
master
Author | SHA1 | Date | |
---|---|---|---|
4fda154917 | |||
54c9fc477c | |||
74924d3de0 |
8
.env
8
.env
@ -15,10 +15,10 @@ IMG_URL_PREFIX="${IMG_REGISTRY}/${IMG_ORG}"
|
|||||||
# Image Settings
|
# Image Settings
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
IMG_ID="server-mga9"
|
IMG_NAME="server-mga9"
|
||||||
IMG_NAME="Rx3 Server Mageia-9 Docker Image"
|
IMG_FULL_NAME="Rx3 Server Mageia-9 Docker Image"
|
||||||
IMG_VERSION="1.0.0"
|
IMG_VERSION="1.1.2"
|
||||||
IMG_URL="${IMG_URL_PREFIX}/${IMG_ID}:${IMG_VERSION}"
|
IMG_URL="${IMG_URL_PREFIX}/${IMG_NAME}:${IMG_VERSION}"
|
||||||
IMG_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>'
|
IMG_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>'
|
||||||
|
|
||||||
|
|
||||||
|
75
Dockerfile
75
Dockerfile
@ -3,18 +3,81 @@
|
|||||||
|
|
||||||
ARG IMG_URL_PREFIX="rx3"
|
ARG IMG_URL_PREFIX="rx3"
|
||||||
|
|
||||||
FROM ${IMG_URL_PREFIX}/base-mga9:1.2.2
|
FROM ${IMG_URL_PREFIX}/base-mga9:1.2.4
|
||||||
|
|
||||||
ARG IMG_ID
|
|
||||||
ARG IMG_NAME
|
ARG IMG_NAME
|
||||||
|
ARG IMG_FULL_NAME
|
||||||
ARG IMG_VERSION
|
ARG IMG_VERSION
|
||||||
ARG IMG_MAINTAINER
|
ARG IMG_MAINTAINER
|
||||||
|
|
||||||
LABEL org.rx3.${IMG_ID}.name=${IMG_NAME}
|
LABEL org.rx3.${IMG_NAME}.name=${IMG_FULL_NAME}
|
||||||
LABEL org.rx3.${IMG_ID}.version=${IMG_VERSION}
|
LABEL org.rx3.${IMG_NAME}.version=${IMG_VERSION}
|
||||||
LABEL org.rx3.${IMG_ID}.maintainer=${IMG_MAINTAINER}
|
LABEL org.rx3.${IMG_NAME}.maintainer=${IMG_MAINTAINER}
|
||||||
LABEL maintainer=${IMG_MAINTAINER}
|
LABEL maintainer=${IMG_MAINTAINER}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------------------------
|
||||||
|
ARG INIT_SHELL='#!/bin/bash \n\
|
||||||
|
\n\
|
||||||
|
function log() { echo "$(date --rfc-3339=ns) Init: $*" | tee -a /var/log/init.log; } \n\
|
||||||
|
\n\
|
||||||
|
log "Starting" \n\
|
||||||
|
\n\
|
||||||
|
for pgm in /etc/rcD.d/* \n\
|
||||||
|
do \n\
|
||||||
|
if [[ -r ${pgm} ]] \n\
|
||||||
|
then \n\
|
||||||
|
if [[ ${pgm##*/} == S99* ]] \n\
|
||||||
|
then \n\
|
||||||
|
log "Executing: [${pgm##*/}]" \n\
|
||||||
|
log "Completed" \n\
|
||||||
|
exec ${pgm} \n\
|
||||||
|
else \n\
|
||||||
|
log "Calling: [${pgm##*/}]" \n\
|
||||||
|
${pgm} \n\
|
||||||
|
fi \n\
|
||||||
|
fi \n\
|
||||||
|
done'
|
||||||
|
#---------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------------------------
|
||||||
|
ARG SUPERVISORD_INI='[inet_http_server] \n\
|
||||||
|
port=*:9001 \n\
|
||||||
|
\n\
|
||||||
|
[supervisord] \n\
|
||||||
|
nodaemon=true \n\
|
||||||
|
user=root'
|
||||||
|
#---------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------------------------
|
||||||
|
ARG CROND_INI='[program:crond] \n\
|
||||||
|
command=crond -n'
|
||||||
|
#---------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------------------------
|
||||||
|
ARG SUPERVISORD='#!/bin/bash \n\
|
||||||
|
\n\
|
||||||
|
exec supervisord -c /etc/supervisord.conf'
|
||||||
|
#---------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
RUN urpmi --force supervisor \
|
||||||
|
&& echo -e "${INIT_SHELL}" | sed -e 's/ *$//' >/usr/local/sbin/init.sh \
|
||||||
|
&& chmod a+x /usr/local/sbin/init.sh \
|
||||||
|
&& mkdir /etc/rc.d/rcD.d \
|
||||||
|
&& ln -s /etc/rc.d/rcD.d /etc \
|
||||||
|
&& echo -e "${SUPERVISORD_INI}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/supervisord.d/supervisord.ini \
|
||||||
|
&& echo -e "${CROND_INI}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/supervisord.d/crond.ini \
|
||||||
|
&& echo -e "${SUPERVISORD}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/supervisord \
|
||||||
|
&& chmod a+x /etc/init.d/supervisord \
|
||||||
|
&& ln -s /etc/init.d/supervisord /etc/rcD.d/S99supervisord
|
||||||
|
|
||||||
|
|
||||||
|
EXPOSE 9001
|
||||||
|
|
||||||
CMD []
|
CMD []
|
||||||
ENTRYPOINT ["sleep", "60m"]
|
ENTRYPOINT ["init.sh"]
|
||||||
|
|
||||||
|
@ -5,8 +5,10 @@ Welcome to Rx3/Server-Mga9 docker image!
|
|||||||
This is project aims to build a Mageia-9 server docker image to be used by others Rx3 packaging projects.
|
This is project aims to build a Mageia-9 server docker image to be used by others Rx3 packaging projects.
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
- Curtently based on rx3/base-mga9:1.2.2 image,
|
- Curtently based on rx3/base-mga9:1.2.4 image,
|
||||||
- ...
|
- Init script calling in order sub scripts in /etc/init.d & /etc/rcD.d,
|
||||||
|
- supervisord managing services,
|
||||||
|
- crond & logrotate configured.
|
||||||
|
|
||||||
|
|
||||||
Enjoy it!
|
Enjoy it!
|
||||||
|
@ -1,5 +1,32 @@
|
|||||||
------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
Server-Mga9 V 1.0.0 - A. GIBERT - 2024/08/25
|
Rx3/Server-Mga9 V 1.1.2 - A. GIBERT - 2024/08/28
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- Use now rx3/base-mga9:1.2.4 image.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
Rx3/Server-Mga9 V 1.1.1 - A. GIBERT - 2024/08/27
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- Minor compose / dockerfile args & structure improvements,
|
||||||
|
- Use now rx3/base-mga9:1.2.3 image.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
Rx3/Server-Mga9 V 1.1.0 - A. GIBERT - 2024/08/26
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- Add & setup supervisord,
|
||||||
|
- Add init.sh script calling in order sub scripts in /etc/init.d & /etc/rcD.d,
|
||||||
|
- Configure crond & logrotate.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
Rx3/Server-Mga9 V 1.0.0 - A. GIBERT - 2024/08/25
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
- Initial release,
|
- Initial release,
|
||||||
|
@ -1,22 +1,25 @@
|
|||||||
# Rx3 Server Mageia-9 Docker Image
|
# Rx3 Server Mageia-9 Docker Image
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
name: ${IMG_ID}
|
name: ${IMG_NAME}
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
server:
|
server:
|
||||||
container_name: ${IMG_ID}
|
container_name: ${IMG_NAME}
|
||||||
|
|
||||||
image: ${IMG_URL}
|
image: ${IMG_URL}
|
||||||
|
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
args:
|
args:
|
||||||
- IMG_ID=${IMG_ID}
|
|
||||||
- IMG_NAME=${IMG_NAME}
|
- IMG_NAME=${IMG_NAME}
|
||||||
|
- IMG_FULL_NAME=${IMG_FULL_NAME}
|
||||||
- IMG_VERSION=${IMG_VERSION}
|
- IMG_VERSION=${IMG_VERSION}
|
||||||
- IMG_MAINTAINER=${IMG_MAINTAINER}
|
- IMG_MAINTAINER=${IMG_MAINTAINER}
|
||||||
- IMG_URL_PREFIX=${IMG_URL_PREFIX}
|
- IMG_URL_PREFIX=${IMG_URL_PREFIX}
|
||||||
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:9010:9001"
|
||||||
|
Loading…
Reference in New Issue
Block a user