add compose file for linked networks and build arg to Dockerfile for ssl cert

This commit is contained in:
root 2024-10-28 02:34:13 +03:00
parent b120024a0a
commit 1fcde8cea7
6 changed files with 42 additions and 3 deletions

4
.dockerignore Normal file
View File

@ -0,0 +1,4 @@
include.conf
config.env.example
README.md
docker-compose.yml

1
.env Symbolic link
View File

@ -0,0 +1 @@
config.env

View File

@ -1,5 +1,7 @@
FROM ubuntu:latest
ARG BUILD_SERVER_NAME="irc.lame-network.local"
ENV ADMIN_EMAIL="no-reply@lame-netwoork.local"
ENV SID="01A"
@ -215,7 +217,7 @@ RUN touch /etc/inspircd/oper.motd.txt
RUN openssl genrsa -out /etc/ssl/inspircd/server.key
RUN openssl req -new -key /etc/ssl/inspircd/server.key -out /etc/ssl/inspircd/server.csr \
-subj "/C=US/ST=Washington/L=Seattle/O=LameNetwork/OU=IT Department/CN=lame-network.local"
-subj "/C=US/ST=Washington/L=Seattle/O=LameNetwork/OU=IT Department/CN=$SERVER_NAME"
RUN openssl x509 -req -days 365 -in /etc/ssl/inspircd/server.csr -signkey /etc/ssl/inspircd/server.key -out /etc/ssl/inspircd/server.crt

View File

@ -1,9 +1,9 @@
# Instructions
- `docker build -t inspi4 -t inspi4:latest .`
- `docker run -it --rm -e 'DEFAULT_BLOCK_HOST_MASK=""' -net host inspi4`
- `docker run -it --rm -e 'DEFAULT_BLOCK_HOST_MASK="nothing"' -net host inspi4`
# Optional
- create a custom `links.conf`
- `docker run -it --rm -e 'DEFAULT_BLOCK_HOST_MASK=""' -net host -v $(pwd)/links.conf:/etc/inspircd/links.conf:ro inspi4`
- `docker run -it --rm -e 'DEFAULT_BLOCK_HOST_MASK="nothing"' -net host -v $(pwd)/links.conf:/etc/inspircd/links.conf:ro inspi4`

21
docker-compose.linked.yml Normal file
View File

@ -0,0 +1,21 @@
services:
ircd_linked:
build:
context: .
args:
BUILD_SERVER_NAME: ${SERVER_NAME}
image: inspi4
network_mode: "host"
env_file: "config.env"
volumes:
- ./links.conf:/etc/inspircd/links.conf:ro
- ssl:/etc/ssl/inspircd
- data:/var/lib/inspircd
- log:/var/log/inspircd
volumes:
data:
name: data
ssl:
name: ssl
log:
name: log

View File

@ -3,3 +3,14 @@ services:
build: .
network_mode: "host"
env_file: "config.env"
volumes:
- ssl:/etc/ssl/inspircd
- data:/var/lib/inspircd
- log:/var/log/inspircd
volumes:
data:
name: data
ssl:
name: ssl
log:
name: log