streamline the container even more for radius

This commit is contained in:
kjeld Schouten-Lebbing 2021-07-06 23:43:43 +02:00
parent bb91f1f97d
commit 6f793fd800
No known key found for this signature in database
GPG Key ID: 4CDAD4A532BC1EDB
2 changed files with 5 additions and 4 deletions

View File

@ -4,13 +4,16 @@ ARG VERSION
FROM freeradius/freeradius-server:${VERSION}
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
VOLUME /config
# hadolint ignore=DL3008,DL3015,SC2086,SC2155
RUN \
mkdir -p /defaults/raddb/ && \
cp -Rf /etc/raddb/* /defaults/raddb/
cp -Rf /etc/raddb/* /defaults/raddb/ && \
rm -Rf /etc/raddb && \
ln -s /config /etc/raddb
VOLUME /config
COPY ./containers/apps/freeradius/entrypoint.sh /entrypoint.sh
LABEL "maintainer"="TrueCharts <info@truecharts.org>"

View File

@ -1,7 +1,6 @@
#!/bin/sh
set -e
rm -Rf /etc/raddb
if [ -f "/config/clients.conf" ]; then
echo "Radius config already exists, skipping config copy..."
else
@ -10,7 +9,6 @@ else
fi
chown -R freerad:freerad /config
ln -s /etc/raddb /config
# this if will check if the first argument is a flag
# but only works if all arguments require a hyphenated flag