commit 7799425b0e6e6df96fb4f74d1e8f993051e281d6 Author: Arnaud G. GIBERT Date: Mon Sep 9 23:59:51 2024 +0200 - Initial release, - Based on server-mga9:1.1.2 image. diff --git a/.env b/.env new file mode 100644 index 0000000..0071acb --- /dev/null +++ b/.env @@ -0,0 +1,31 @@ +# Rx3 RabbitMQ Mageia-9 Docker Image +#------------------------------------------------------------------------------- + +#------------------------------------------------------------------------------- +# Global Settings +#------------------------------------------------------------------------------- + +IMG_ORG="rx3" +IMG_REGISTRY="docker.xor.rx3:5000" +IMG_URL_PREFIX="${IMG_REGISTRY}/${IMG_ORG}" + + + +#------------------------------------------------------------------------------- +# Image Settings +#------------------------------------------------------------------------------- + +IMG_NAME="rabbitmq-mga9" +IMG_FULL_NAME="Rx3 RabbitMQ Mageia-9 Docker Image" +IMG_VERSION="1.0.0" +IMG_URL="${IMG_URL_PREFIX}/${IMG_NAME}:${IMG_VERSION}" +IMG_MAINTAINER='"Arnaud G. GIBERT" ' + + + +#------------------------------------------------------------------------------- +# User Settings +#------------------------------------------------------------------------------- + +RABBITMQ_UID=480 +RABBITMQ_GID=398 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..556bc65 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*~ +*.old diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4e1a8f8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,51 @@ +# Rx3 RabbitMQ Mageia-9 Docker Image +#------------------------------------------------------------------------------- + +ARG IMG_URL_PREFIX="rx3" + +FROM ${IMG_URL_PREFIX}/server-mga9:1.1.2 + +ARG IMG_NAME +ARG IMG_FULL_NAME +ARG IMG_VERSION +ARG IMG_MAINTAINER + +LABEL org.rx3.${IMG_NAME}.name=${IMG_FULL_NAME} +LABEL org.rx3.${IMG_NAME}.version=${IMG_VERSION} +LABEL org.rx3.${IMG_NAME}.maintainer=${IMG_MAINTAINER} +LABEL maintainer=${IMG_MAINTAINER} + + +ARG RABBITMQ_LIB=/var/lib/rabbitmq + +#--------------------------------------------------------------------------------------------------- +ARG RABBITMQD='#!/bin/bash \n\ + \n\ +usermod -u ${RABBITMQ_UID} -s /bin/bash rabbitmq \n\ +groupmod -g ${RABBITMQ_GID} rabbitmq \n\ + \n\ +chown -R rabbitmq:rabbitmq '${RABBITMQ_LIB}' /var/log/rabbitmq /var/run/rabbitmq' +#--------------------------------------------------------------------------------------------------- + +#--------------------------------------------------------------------------------------------------- +ARG RABBITMQD_INI='[program:rabbitmqd] \n\ +command=su - rabbitmq -c /usr/lib/rabbitmq/bin/rabbitmq-server \n\ +user=root' +#--------------------------------------------------------------------------------------------------- + + + +RUN urpmi --force lksctp-tools \ + && rpm -Uvh http://ftp.free.fr/mirrors/mageia.org/distrib/8/x86_64/media/core/updates/erlang-erts-23.2.1-3.2.mga8.x86_64.rpm http://ftp.free.fr/mirrors/mageia.org/distrib/8/x86_64/media/core/updates/erlang-crypto-23.2.1-3.2.mga8.x86_64.rpm http://ftp.free.fr/mirrors/mageia.org/distrib/8/x86_64/media/core/updates/erlang-kernel-23.2.1-3.2.mga8.x86_64.rpm http://ftp.free.fr/mirrors/mageia.org/distrib/8/x86_64/media/core/updates/erlang-stdlib-23.2.1-3.2.mga8.x86_64.rpm http://ftp.free.fr/mirrors/mageia.org/distrib/8/x86_64/media/core/updates/erlang-syntax_tools-23.2.1-3.2.mga8.x86_64.rpm http://ftp.free.fr/mirrors/mageia.org/distrib/8/x86_64/media/core/updates/erlang-hipe-23.2.1-3.2.mga8.x86_64.rpm http://ftp.free.fr/mirrors/mageia.org/distrib/8/x86_64/media/core/updates/erlang-compiler-23.2.1-3.2.mga8.x86_64.rpm http://ftp.free.fr/mirrors/mageia.org/distrib/8/x86_64/media/core/updates/erlang-mnesia-23.2.1-3.2.mga8.x86_64.rpm http://ftp.free.fr/mirrors/mageia.org/distrib/8/x86_64/media/core/updates/erlang-runtime_tools-23.2.1-3.2.mga8.x86_64.rpm http://ftp.free.fr/mirrors/mageia.org/distrib/8/x86_64/media/core/updates/erlang-asn1-23.2.1-3.2.mga8.x86_64.rpm http://ftp.free.fr/mirrors/mageia.org/distrib/8/x86_64/media/core/updates/erlang-public_key-23.2.1-3.2.mga8.x86_64.rpm http://ftp.free.fr/mirrors/mageia.org/distrib/8/x86_64/media/core/updates/erlang-ssl-23.2.1-3.2.mga8.x86_64.rpm http://ftp.free.fr/mirrors/mageia.org/distrib/8/x86_64/media/core/updates/erlang-inets-23.2.1-3.2.mga8.x86_64.rpm http://ftp.free.fr/mirrors/mageia.org/distrib/8/x86_64/media/core/updates/erlang-tools-23.2.1-3.2.mga8.x86_64.rpm http://ftp.free.fr/mirrors/mageia.org/distrib/8/x86_64/media/core/updates/erlang-sasl-23.2.1-3.2.mga8.x86_64.rpm http://ftp.free.fr/mirrors/mageia.org/distrib/8/x86_64/media/core/updates/erlang-eldap-23.2.1-3.2.mga8.x86_64.rpm http://ftp.free.fr/mirrors/mageia.org/distrib/8/x86_64/media/core/updates/erlang-snmp-23.2.1-3.2.mga8.x86_64.rpm http://ftp.free.fr/mirrors/mageia.org/distrib/8/x86_64/media/core/updates/erlang-os_mon-23.2.1-3.2.mga8.x86_64.rpm http://ftp.free.fr/mirrors/mageia.org/distrib/8/x86_64/media/core/release/erlang-sd_notify-1.1-1.mga8.noarch.rpm http://ftp.free.fr/mirrors/mageia.org/distrib/8/x86_64/media/core/updates/erlang-xmerl-23.2.1-3.2.mga8.x86_64.rpm http://ftp.free.fr/mirrors/mageia.org/distrib/8/x86_64/media/core/updates/rabbitmq-server-3.8.18-1.mga8.x86_64.rpm http://ftp.free.fr/mirrors/mageia.org/distrib/8/x86_64/media/core/updates/lib64openssl1.1-1.1.1v-1.mga8.x86_64.rpm \ + && rabbitmq-plugins enable rabbitmq_management \ + && echo -e "${RABBITMQD}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/rabbitmqd \ + && chmod a+x /etc/init.d/rabbitmqd \ + && ln -s /etc/init.d/rabbitmqd /etc/rcD.d/S40rabbitmqd \ + && echo -e "${RABBITMQD_INI}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/supervisord.d/rabbitmqd.ini + + + +VOLUME ${RABBITMQ_LIB} + +EXPOSE 5672 +EXPOSE 15672 diff --git a/ReadMe.txt b/ReadMe.txt new file mode 100644 index 0000000..73978b9 --- /dev/null +++ b/ReadMe.txt @@ -0,0 +1,21 @@ +Welcome to Rx3/RabbitMQ-Mga9 docker image! + + + +This is project aims to build a RabbitMQ + Mageia 9 docker image used by others Rx3 packaging projects. + +Features: + - Curtently based on rx3/server-mga9:1.1.2 image, + - Fallback on RabbitMQ 3.8.18 from Mageia 8 next to broken Mageia 9 version! + - Following env vars supported: + - RABBITMQ_UID & RABBITMQ_GID, + - Management olugin enabled. + + +Enjoy it! + +Your Rx3 Team. + +-- +arnaud@rx3.net +https://git.rx3.org/gitea/rx3/rabbitmq-mga9 diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt new file mode 100644 index 0000000..5aa67e8 --- /dev/null +++ b/ReleaseNotes.txt @@ -0,0 +1,6 @@ +------------------------------------------------------------------------------------------------------------------------------------ +Rx3/RabbitMQ-Mga9 V 1.0.0 - A. GIBERT - 2024/09/09 +------------------------------------------------------------------------------------------------------------------------------------ + +- Initial release, +- Based on server-mga9:1.1.2 image. diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..7c1efe1 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,36 @@ +# Rx3 RabbitMQ Mageia-9 Docker Image +#------------------------------------------------------------------------------- + +name: ${IMG_NAME} + +services: + + mqserver: + container_name: ${IMG_NAME} + + image: ${IMG_URL} + + build: + context: . + args: + - IMG_NAME=${IMG_NAME} + - IMG_FULL_NAME=${IMG_FULL_NAME} + - IMG_VERSION=${IMG_VERSION} + - IMG_MAINTAINER=${IMG_MAINTAINER} + - IMG_URL_PREFIX=${IMG_URL_PREFIX} + + restart: unless-stopped + + environment: + RABBITMQ_UID: ${RABBITMQ_UID} + RABBITMQ_GID: ${RABBITMQ_GID} + + volumes: + - ./lib/rabbitmq:/var/lib/rabbitmq + + network_mode: bridge + + ports: + - "127.0.0.1:9015:9001" + - "127.0.0.1:8072:5672" + - "127.0.0.1:8073:15672"