Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (27 loc) · 1.46 KB
/
Copy pathDockerfile
File metadata and controls
36 lines (27 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2026 DAASI International GmbH <info@daasi.de>
FROM debian:trixie
LABEL org.opencontainers.image.authors="DAASI International GmbH"
LABEL org.opencontainers.image.url="https://gitlab.daasi.de/edumfa/edumfa-radius"
LABEL org.opencontainers.image.source="https://github.com/eduMFA/edumfa-radius"
# CI sets org.opencontainers.image.version
# Install system dependencies
RUN apt-get update && \
apt-get install -y freeradius freeradius-python3 python3 python3-requests && \
apt-get -y autoremove && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Copy necessary files
COPY ./deploy/docker/entrypoint.sh /entrypoint.sh
COPY ./edumfa-radius-plugin/edumfa_radius.py /usr/share/edumfa/freeradius/edumfa_radius.py
COPY ./deploy/site_config.unlang /etc/freeradius/3.0/sites-available/edumfa
# Enable the Python module and site configuration
RUN ln -sf /etc/freeradius/3.0/mods-available/edumfa /etc/freeradius/3.0/mods-enabled/ && \
rm -f /etc/freeradius/3.0/sites-enabled/* && \
ln -s /etc/freeradius/3.0/sites-available/edumfa /etc/freeradius/3.0/sites-enabled/ && \
rm -f /etc/freeradius/3.0/mods-enabled/eap
# Harden: remove freerad from superfluous groups
RUN gpasswd shadow -d freerad && gpasswd ssl-cert -d freerad
USER freerad
HEALTHCHECK CMD echo "User-Name=_dockerprobe,User-Password=pass" | radclient -r 1 localhost:1812 auth testing123 | grep '^Received Access-'
ENTRYPOINT ["/entrypoint.sh"]