Changelog, ssmtp, image optimisation, libcanlock.

This commit is contained in:
2026-07-26 19:22:05 +05:00
parent e24afd9f98
commit 040dddf723
3 changed files with 91 additions and 13 deletions
+22
View File
@@ -0,0 +1,22 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) but do not follows semantic versioning as it is useless in this type of project.
## [2.7.4-1] - 2026-07-26
### Added
* libcanlock support.
* ssmtp for sending mails.
### Changed
* Little image optimisation - compile everything and cleanup sources in one command. Saves ~10 megabytes 😅.
## [2.7.4] - 2026-07-24
Initial container release with inn 2.7.4 built with perl/python/sqlite support.
[2.7.4]: https://code.pztrn.name/containers/inn2/releases/tag/2.7.4
+14 -11
View File
@@ -4,7 +4,9 @@ ENV PERL_MM_USE_DEFAULT=1
RUN apk add --no-cache \
bison \
build-base \
bzip2 \
curl \
flex \
gawk \
gd-dev \
gnupg \
@@ -20,27 +22,29 @@ RUN apk add --no-cache \
s6 \
shadow \
sqlite-dev \
ssmtp \
tar \
zlib-dev && \
cpan -T GD MIME::Parser && \
rm -rf /root/.cpan
ARG VERSION=2.7.4
RUN curl -sL https://github.com/InterNetNews/inn/releases/download/${VERSION}/inn-${VERSION}.tar.gz | tar xz
WORKDIR /inn-${VERSION}
RUN ./configure --prefix=/inn2 --with-zlib --with-openssl --with-sqlite --with-krb5 --with-perl --with-python && \
# Build everything in one command and cleanup sources so container will eat less space.
RUN mkdir /src && cd /src && \
# libcanlock
curl -sL https://micha.freeshell.org/libcanlock/src/libcanlock-3.3.3.tar.bz2 | tar xj && cd libcanlock-3.3.3 && ./configure && make && make install && \
# inn2
cd /src && curl -sL https://github.com/InterNetNews/inn/releases/download/2.7.4/inn-2.7.4.tar.gz | tar xz && cd inn-2.7.4 && \
./configure --prefix=/inn2 --with-zlib --with-openssl --with-sqlite --with-krb5 --with-perl --with-python --with-canlock && \
make && \
sed -i 's/#domain:/domain: news.localhost/' site/inn.conf && \
make install
RUN sed -i 's/#\(tlscapath:\)/\1/' /inn2/etc/inn.conf && \
make install && \
sed -i 's/#\(tlscapath:\)/\1/' /inn2/etc/inn.conf && \
sed -i 's/#\(tlscertfile:\)/\1/' /inn2/etc/inn.conf && \
sed -i 's/#\(tlskeyfile:\)/\1/' /inn2/etc/inn.conf && \
mv /inn2/etc /inn2/etc-default && \
mv /inn2/db /inn2/db-default && \
mv /inn2/spool /inn2/spool-default
mv /inn2/spool /inn2/spool-default && \
rm -rf /src
COPY configuration /etc
COPY start-innd.sh /start-innd
@@ -49,7 +53,6 @@ RUN groupmod -g 600 news && usermod -u 600 -g 600 -d /inn2 news && chown -R news
WORKDIR /inn2
ENV PATH=/inn2/bin:$PATH
ENV PERL_MM_USE_DEFAULT=1
USER news
EXPOSE 119
EXPOSE 563
+55 -2
View File
@@ -8,7 +8,7 @@ This container is based on [greenbender's image](https://github.com/greenbender/
Configuration files are described on [inn official site](https://www.eyrie.org/~eagle/software/inn/) (select proper version from right sidebar).
Using this container with compose:
Using this container with compose is simple:
```yaml
---
@@ -32,6 +32,53 @@ services:
hard: 65535
```
It is recommended to use macvlan/ipvlan network for container so real user IP will flow within inn2 as by default it will be docker's network gateway for compose project. For that compose file will looks like:
```yaml
---
services:
inn:
image: "code.pztrn.name/containers/inn2:2.7.4"
restart: always
volumes:
- "./data/db:/inn2/db"
- "./data/etc:/inn2/etc"
- "./data/log:/inn2/log"
- "./data/run:/inn2/run"
- "./data/spool:/inn2/spool"
- "./data/tmp:/inn2/tmp"
networks:
inn2-ipvlan:
ipv4_address: 192.168.168.168 # ip address from real LAN.
ipv6_address: fd00:0:1:2::168 # ip address from real LAN.
ulimits:
nofile:
soft: 65535
hard: 65535
networks:
inn2-ipvlan:
driver: ipvlan
driver_opts:
parent: ens18 # put your real interface name here.
ipvlan_mode: l2
ipam:
config:
- subnet: 192.168.168.160/27 # put real LAN subnet here.
gateway: 192.168.168.161 # put real LAN gateway here.
ip_range: 192.168.168.168/32 # ip address from real LAN.
- subnet: fd00:0:1:2::/64 # put real LAN subnet here.
gateway: fd00:0:1:2::1 # put real LAN gateway here.
ip_range: fd00:0:1:2::168/128 # ip address from real LAN.
enable_ipv6: true
```
Note that this code is built to support dual-stack (IPv4+IPv6). You should either:
1. Remove IPv6 things if not using it.
2. Set up SNAT6 for outgoing connections to work (on host or router).
3. Add globally routable address to IPAM config and network definition in container.
## Cronjobs
There is a section in documentation about cron jobs you should configure. This docker image currently isn't supporting these, so configure it separately with lines like:
@@ -40,15 +87,21 @@ There is a section in documentation about cron jobs you should configure. This d
0 3 * * * docker compose run inn news.daily expireover lowmark
```
## Sending emails
As this container has no postfix installed (why do you might ever need it here?) you can use [ssmtp](https://wiki.debian.org/sSMTP) which installed in container to get mails sent over SMTP.
## Versioning
Image versioning follows official inn2 versions with additional optional version postfix added to indicate image fixes for particular version.
Examples:
* 2.7.4-3 - inn version 2.7.4 and 3 additional fixes applied to container.
* 2.7.4-3 - inn version 2.7.4 and 3 additional fixes applied to container or inn's dependencies.
* 2.7.6 - inn version 2.7.6 without additional container fixes.
All notable changes to container and it's building process are noted in [CHANGELOG.md].
## Data directories and permissions
Configuration is kept in `/inn2/etc`, mount it in your local filesystem. Entrypoint script will copy default configuration for you if missing.