- Initial release,

- Based on rx3-docker/server:1.2.1-mga9 image,
- MicroSocks V1.0.5.
This commit is contained in:
Arnaud G. GIBERT 2025-04-05 11:17:44 +02:00
commit 435e416e97
6 changed files with 235 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*~
*.old

48
Dockerfile Normal file
View File

@ -0,0 +1,48 @@
# Rx3-Docker/MicroSocks Dockerfile
#-------------------------------------------------------------------------------
ARG IMG_FROM_URL="rx3-docker/server:latest"
FROM ${IMG_FROM_URL}
ARG IMG_NAME
ARG IMG_NAME_FULL
ARG IMG_VERSION
ARG IMG_MAINTAINER
LABEL org.rx3.${IMG_NAME}.name=${IMG_NAME_FULL}
LABEL org.rx3.${IMG_NAME}.version=${IMG_VERSION}
LABEL org.rx3.${IMG_NAME}.maintainer=${IMG_MAINTAINER}
LABEL maintainer=${IMG_MAINTAINER}
ARG MICROSOCKS_PORT
ARG MICROSOCKS_LOG=/var/log/microsocks
#---------------------------------------------------------------------------------------------------------------
ARG MICROSOCKSD='#!/bin/bash \n\
\n\
usermod -u ${MICROSOCKS_UID} microsock \n\
groupmod -g ${MICROSOCKS_GID} microsock \n\
\n\
chown -R microsock:microsock '${MICROSOCKS_LOG}
#---------------------------------------------------------------------------------------------------------------
#---------------------------------------------------------------------------------------------------------------
ARG MICROSOCKSD_INI='[program:microsockd] \n\
command=microsock ${MICROSOCKS_OPTIONS} > '${MICROSOCKS_LOG}' \n\
user=microsock'
#---------------------------------------------------------------------------------------------------------------
RUN urpmi.update -a \
urpmi --force microsocks \
&& mkdir ${MICROSOCKS_LOG} \
&& echo -e "${MICROSOCKSD}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/microsocksd \
&& chmod a+x /etc/init.d/microsocksd \
&& ln -s /etc/init.d/microsocksd /etc/rcD.d/S30microsocksd \
&& echo -e "${MICROSOCKSD_INI}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/supervisord.d/microsocksd.ini
EXPOSE ${MICROSOCKS_PORT}

18
ReadMe.txt Normal file
View File

@ -0,0 +1,18 @@
Welcome to Rx3-Docker/MicroSocks docker image!
This project aims to build a MicroSocks docker image.
Features:
- Curtently based on rx3-docker/server:1.2.1-mga9 image,
- Use microsock 1.0.5.
Enjoy it!
Your Rx3 Team.
--
arnaud@rx3.net
https://git.rx3.org/gitea/rx3-docker/microsocks

7
ReleaseNotes.txt Normal file
View File

@ -0,0 +1,7 @@
------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/MicroSocks V 1.0.0 - A. GIBERT - 2025/04/05
------------------------------------------------------------------------------------------------------------------------------------
- Initial release,
- Based on rx3-docker/server:1.2.1-mga9 image,
- MicroSocks V1.0.5.

68
compose.yaml Normal file
View File

@ -0,0 +1,68 @@
# Rx3-Docker/MicroSocks Docker Image
#-------------------------------------------------------------------------------
name: ${HOST_NAME_PREFIX}
services:
#-------------------------------------------------------------------------------
topic-server:
container_name: ${SP_HOST_NAME}
hostname: ${SP_HOST_NAME}
image: ${SP_IMG_URL}
build:
args:
IMG_NAME: ${SP_IMG_URL}
IMG_NAME_FULL: ${SP_IMG_NAME_FULL}
IMG_VERSION: ${SP_IMG_VERSION}
IMG_MAINTAINER: ${SP_IMG_MAINTAINER}
IMG_FROM_URL: ${SP_IMG_FROM_URL}
MICORSOCKS_PORT: ${SP_PORT_MAIN_INT}
restart: unless-stopped
environment:
MICROSOCKS_UID: ${SP_USER_ID}
MICROSOCKS_GID: ${SP_GROUP_ID}
MICROSOCKS_OPTIONS: ${SP_CMD_OPTIONS}
# healthcheck:
# test: /opt/appl/kafka/bin/kafka-cluster.sh cluster-id --bootstrap-server localhost:${SP_PORT_MAIN_INT}
# interval: 30s
# timeout: 10s
# start_period: 60s
# start_interval: 10s
# retries: 30
volumes:
# - ./${SP_LIB_EXT}:${SP_LIB_INT}
- ./${SP_LOG_INIT_EXT}:${SP_LOG_INIT_INT}
- ./${SP_LOG_SV_EXT}:${SP_LOG_SV_INT}
- ./${SP_LOG_MAIN_EXT}:${SP_LOG_MAIN_INT}
networks:
proxy:
ipv4_address: ${NETWORK_ADDRESS}
# ports:
# - "127.0.0.1:${SP_PORT_SV_EXT}:${SP_PORT_SV_INT}"
# - "127.0.0.1:${SP_PORT_MAIN_EXT}:${SP_PORT_MAIN_INT}"
#-------------------------------------------------------------------------------
networks:
proxy:
name: ${NETWORK_NAME}
driver: bridge
driver_opts:
com.docker.network.bridge.name: ${NETWORK_IF_NAME}
ipam:
config:
- subnet: ${NETWORK_SUBNET}
gateway: ${NETWORK_GATEWAY}

92
env.dist Normal file
View File

@ -0,0 +1,92 @@
# Rx3-Docker/MicroSocks Docker Image
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Global Settings
#-------------------------------------------------------------------------------
ORG_NAME="rx3-docker"
ORG_REGISTRY="docker.xor.rx3:5000"
ORG_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>'
ORG_URL_PREFIX="${ORG_REGISTRY}/${ORG_NAME}"
#-------------------------------------------------------------------------------
# Image Settings
#-------------------------------------------------------------------------------
APPL_NAME="microsocks"
APPL_NAME_FULL="MicroSocks Proxy"
APPL_NAME_SHORT="micsoc"
APPL_ORG="rx3"
APPL_VERSION="1.0.0"
APPL_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>'
APPL_URL_PREFIX="${ORG_REGISTRY}/${APPL_ORG}"
#-------------------------------------------------------------------------------
# User Settings
#-------------------------------------------------------------------------------
#APPL_ENV="prd"
#APPL_ENV="tst"
#APPL_ENV="int"
APPL_ENV="dvp"
#-------------------------------------------------------------------------------
# Common
#-------------------------------------------------------------------------------
if [[ "${APPL_ENV}" != "prd" ]]
then
APPL_SUFFIX="-${APPL_ENV}"
PORT_ENV_OFFSET=100
else
APPL_SUFFIX=""
PORT_ENV_OFFSET=0
fi
APPL_USER="apache"
APPL_GROUP="apache"
HOST_NAME_PREFIX=${APPL_NAME}${APPL_SUFFIX}
NETWORK_NAME=${HOST_NAME_PREFIX}
NETWORK_IF_NAME=br-${APPL_NAME_SHORT}-${APPL_ENV}
PORT_ENV_OFFSET=0
PORT_SV_INT=9001
PORT_SV_OFFSET=1000
DOCKER_TOOLS_DEBUG=FALSE
DOCKER_TOOLS_VOLUME=SINGLE
#------------------+----------+--------------------------+--------------------+------------------+-------------------------------+----------------------+--------------------+---------------+------------+--------------+------------+-------+-------+-------+-------+--------------+--------------+
# | Variable | Service | Target Image | From Image | Module | Main Port | Admin Port | User | Group |
# | Prefix | Name | URL Prefix | Name | Name Full | Version | URL Prefix | Name | Version | Name | Version | Ext | Int | Ext | Int | Name / Id | Name / Id |
#------------------+----------+--------------------------+--------------------+------------------+-------------------------------+----------------------+--------------------+---------------+------------+--------------+------------+-------+-------+-------+-------+--------------+--------------+
docker_service_add SP socks-proxy ${ORG_URL_PREFIX} microsocks "Rx3-Docker/MicroSocks" ${APPL_VERSION}-mga9 ${ORG_URL_PREFIX} server 1.2.1-mga9 - - 1080 1080 - - apache apache
#-------------------------------------------------------------------------------
# User Settings
#-------------------------------------------------------------------------------
SERVER_CROND_ENABLED="FALSE"
SP_CMD_OPTIONS=""
NETWORK_SUBNET=10.10.33.8/30
NETWORK_ADDRESS=10.10.33.9
NETWORK_GATEWAY=10.10.33.10