forked from lirantal/daloradius
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-freeradius
52 lines (42 loc) · 1.34 KB
/
Dockerfile-freeradius
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Official daloRADIUS Dockerfile for freeradius
# GitHub: https://github.com/lirantal/daloradius
#
# Build image:
# 1. git pull git@github.com:lirantal/daloradius.git
# 2. docker build -t lirantal/daloradius -f Dockerfile-freeradius
#
# Run the container:
# 1. docker run -p 80:80 -d lirantal/dalofreeradius
FROM freeradius/freeradius-server:latest
MAINTAINER Liran Tal <liran.tal@gmail.com>
LABEL Description="freeradius Docker based on Ubuntu 20.04 LTS, optimized for daloRADIUS." \
License="GPLv2" \
Usage="docker build -t lirantal/dalofreeradius -f Dockerfile-freeradius && docker run -d -p 80:80 lirantal/dalofreeradius" \
Version="1.0"
ENV DEBIAN_FRONTEND noninteractive
# default timezone
ENV TZ Europe/Vienna
RUN apt-get update \
&& apt-get install --yes --no-install-recommends \
apt-utils \
ipcalc \
tzdata \
net-tools \
mariadb-client \
libmysqlclient-dev \
unzip \
wget \
&& rm -rf /var/lib/apt/lists/*
# Create directories
# /data should be mounted as volume to avoid recreation of database entries
RUN mkdir /app /data
WORKDIR /app
# Copy init script to image
ADD ./init-freeradius.sh /app
# Make init.sh script executable
RUN chmod +x /app/init-freeradius.sh
# Expose FreeRADIUS Ports
EXPOSE 1812 1813
# Run the script which executes freeradius in foreground
CMD ["/app/init-freeradius.sh"]
ENTRYPOINT ["/app/init-freeradius.sh"]