forked from asdaru/freeradius-mysql-daloradius
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (29 loc) · 1.32 KB
/
Dockerfile
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
FROM ubuntu:16.04
ENV MYSQLTMPROOT toor
RUN echo mysql-server mysql-server/root_password password $MYSQLTMPROOT | debconf-set-selections;\
echo mysql-server mysql-server/root_password_again password $MYSQLTMPROOT | debconf-set-selections;\
apt-get update && apt-get install -y mysql-server mysql-client libmysqlclient-dev \
nginx php php-common php-gd php-curl php-mail php-mail-mime php-pear php-db php-mysqlnd \
freeradius freeradius-mysql freeradius-utils \
wget unzip && \
pear install DB && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /root/.cpan
ENV RADIUS_DB_PWD radpass
ENV CLIENT_NET "0.0.0.0/0"
ENV CLIENT_SECRET testing123
RUN wget https://github.com/lirantal/daloradius/archive/master.zip && \
unzip *.zip && \
mv daloradius-master /var/www/daloradius && \
mkdir -p /var/www/daloradius/var/backup && \
cp /var/www/daloradius/library/daloradius.conf.php.sample /var/www/daloradius/library/daloradius.conf.php && \
chown -R www-data:www-data /var/www/daloradius && \
chmod 644 /var/www/daloradius/library/daloradius.conf.php && \
rm /etc/nginx/sites-enabled/default
VOLUME ["/var/www/daloradius/var/backup"]
COPY init.sh /
COPY run.sh /
RUN chmod +x /init.sh && chmod +x /run.sh
COPY etc/nginx/radius.conf /etc/nginx/sites-enabled/
EXPOSE 1812 1813 80
ENTRYPOINT ["/run.sh"]