1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/freeradius/Dockerfile

32 lines
989 B
Docker
Raw Normal View History

2016-07-27 08:55:05 +02:00
#
# Dockerfile for freeradius
#
FROM alpine
2017-05-08 01:05:07 +02:00
MAINTAINER kev <noreply@easypi.pro>
2016-07-27 08:55:05 +02:00
RUN set -xe \
&& apk add --no-cache freeradius \
2016-07-28 07:35:00 +02:00
freeradius-mysql \
2016-07-27 08:55:05 +02:00
freeradius-radclient \
2016-07-28 12:05:54 +02:00
make \
openssl \
&& /etc/raddb/certs/bootstrap \
2016-07-28 09:37:07 +02:00
&& ln -s /etc/raddb/mods-available/sql \
/etc/raddb/mods-available/sqlcounter /etc/raddb/mods-enabled \
2016-07-28 07:35:00 +02:00
&& sed -i -e 's@driver =.*@driver = "rlm_sql_mysql"@' \
-e 's@dialect =.*@dialect = "mysql"@' \
2016-07-28 09:37:07 +02:00
-e '/read_clients = yes/s@^#@@' \
2016-07-28 07:35:00 +02:00
-e '/Connection info:/,/^$/{s@^#@@;s@localhost@mysql@}' \
2016-07-28 12:05:54 +02:00
/etc/raddb/mods-available/sql \
&& sed -i -e '/^#\t*eap$/s@^#@@' \
-e '/^#\teap {$/,/#\t}$/s@^#@@' \
2017-06-06 07:55:33 +02:00
/etc/raddb/sites-enabled/default \
&& chown -R root:radius /etc/raddb
2016-07-27 08:55:05 +02:00
VOLUME /etc/raddb
2016-07-28 07:35:00 +02:00
EXPOSE 1812/udp 1813/udp
2016-07-27 08:55:05 +02:00
2016-07-28 07:35:00 +02:00
CMD ["radiusd", "-fl", "stdout"]