Add container build

This commit is contained in:
Luiz Felipe F M Costa 2023-10-26 12:33:29 -03:00
parent 3f3557421e
commit 71d7998afe
3 changed files with 74 additions and 0 deletions

25
.containerignore Normal file
View File

@ -0,0 +1,25 @@
# container build
container/
# from .gitignore
.auto
.deps
.dirstamp
Makefile
Makefile.in
stamp-*
aclocal.m4
autom4te.cache
config.h
config.h.in
config.log
config.status
configure
*.o
rinetd
rinetd.exe
*.vcxproj.user
Debug
Release

35
container/Dockerfile Normal file
View File

@ -0,0 +1,35 @@
# registry.access.redhat.com/ubi9/ubi:latest
FROM docker.io/redhat/ubi9:latest AS builder
RUN set -x \
&& dnf upgrade -y \
# Install OS dependencies
&& dnf install -y \
# C compiler, make and related tools
gcc \
make \
cmake \
automake
# Copy source to /build/
COPY . /build/
WORKDIR /build/
RUN set -x \
# Build
&& ./bootstrap \
&& ./configure \
&& make \
# Install
&& cd /build/ \
&& make install
# ==========================
# Final image
FROM docker.io/redhat/ubi9:latest
RUN set -x \
&& dnf upgrade -y \
&& dnf clean all
COPY --from=builder /usr/local/sbin/rinetd /usr/local/sbin/rinetd

14
container/rinetd.conf Normal file
View File

@ -0,0 +1,14 @@
#
# forwarding rules come here
#
# you may specify allow and deny rules after a specific forwarding rule
# to apply to only that forwarding rule
#
# bindadress bindport connectaddress connectport
0.0.0.0 8080 localhost 9000
# logging information
logfile /var/log/rinetd.log
# uncomment the following line if you want web-server style logfile format
# logcommon