diff --git a/freeradius/Dockerfile b/freeradius/Dockerfile index 211908b..0f5a312 100644 --- a/freeradius/Dockerfile +++ b/freeradius/Dockerfile @@ -12,7 +12,6 @@ RUN set -xe \ make \ openssl \ && /etc/raddb/certs/bootstrap \ - && chown -R root:radius /etc/raddb/certs \ && ln -s /etc/raddb/mods-available/sql \ /etc/raddb/mods-available/sqlcounter /etc/raddb/mods-enabled \ && sed -i -e 's@driver =.*@driver = "rlm_sql_mysql"@' \ @@ -23,6 +22,7 @@ RUN set -xe \ && sed -i -e '/^#\t*eap$/s@^#@@' \ -e '/^#\teap {$/,/#\t}$/s@^#@@' \ /etc/raddb/sites-enabled/default + && chown -R root:radius /etc/raddb VOLUME /etc/raddb diff --git a/freeradius/Dockerfile.sqlite b/freeradius/Dockerfile.sqlite index 5e58f41..770a219 100644 --- a/freeradius/Dockerfile.sqlite +++ b/freeradius/Dockerfile.sqlite @@ -22,7 +22,8 @@ RUN set -xe \ && echo "INSERT INTO radcheck VALUES('0','user','Cleartext-Password',':=','pass');" | sqlite3 freeradius.db \ && radiusd \ && radtest user pass localhost 0 testing123 \ - && echo "DELETE FROM radcheck WHERE id='0';" | sqlite3 freeradius.db + && echo "DELETE FROM radcheck WHERE id='0';" | sqlite3 freeradius.db \ + && chown -R root:radius /etc/raddb VOLUME /etc/raddb