Table of Contents

About

The purpose of this docker build is to created an easily deployable FreeRADIUS container that implements MAC-based authentication.

Usage

Download the file Dockerfile to an empty directory and issue:

docker build -t TAG .

where:

After caddy is built, a container can be created and ran either via docker run or deployed within the swarm with docker stack deploy. A Docker compose file is available to that end

Note that if the image is to be deployed to a swarm, then more than likely the image should be committed to a local registry serving the local docker swarm.

Source

FROM freeradius/freeradius-server:latest
 
# update package manager
RUN  apt-get update -y && \
     apt-get upgrade -y && \
     apt-get dist-upgrade -y && \
     apt-get -y autoremove && \
     apt-get clean
 
# generate SSL snakeoil for freeradius
RUN apt-get -y install ssl-cert && \
    make-ssl-cert generate-default-snakeoil
 
# install helper tools
RUN apt-get -y install \
    inotify-tools \
    bash \
    supervisor
 
# add filesystem requirements
COPY raddb/ /etc/raddb/
ADD rootfs /
 
# specify the volume mountpoint
VOLUME /data
 
# expose FreeRADIUS ports
EXPOSE 1812-1813:1812-1813/udp
 
# start supervisord to monitor processes
ENTRYPOINT [ "supervisord", "-t", "-n", "-c", "/etc/supervisor.conf" ]