RADIUSdesk Docker Image
Introduction
- You need to know the basics of Docker to be able to execute these instructions.
- The Docker image will create a split image (two containers)
- One container will be the database with MariaDB
- The other container is the web server with Nginx, PHP and FreeRADIUS.
Install Docker
- We assume that you are a user-named system on a standard Ubuntu installation.
- Enter the following commands to install the Docker system on your computer.
USER="system" sudo apt-get update sudo apt-get install -y \ ca-certificates \ curl \ gnupg \ lsb-release sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin sudo apt-get -y install docker-compose # Make docker run as non root sudo usermod -aG docker $USER sudo chmod 666 /var/run/docker.sock # customize it with your own. sudo mkdir -p /mnt/data # make sure all future data in this folder can be created as non root sudo chown $USER:$USER /mnt/data
Create the Docker containers
- Everything you need to create the RADIUSdesk Docker containers is provided with the RADIUSdesk (rdcore) repository.
- Check out the rdcore git repository.
cd ~ sudo git clone https://github.com/RADIUSdesk/rdcore.git
- Mount the rdcore top directory to the rdcore/docker/rdcore directory
cd rdcore/docker sudo mkdir rdcore sudo mount --bind ../../rdcore ./rdcore
- Execute the script local_build.sh.
./local_build.sh
- There will be feedback on the screen as the two docker containers getting built.
- On my one Ubuntu machine I got an error message about
docker-credential-desktop not installed or not available in PATH
- The cure was to edit ~/.docker/config.json and replace “credsStore” by “credStore”.
{ "auths": {}, "credStore": "desktop", "currentContext": "default" }
- After the process is complete, you can confirm that it is running
docker container ls CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 98339a6a1b57 docker_radiusdesk "/bin/sh -c '/usr/bi…" About an hour ago Up About an hour 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:1812-1813->1812-1813/udp, :::1812-1813->1812-1813/udp, 9000/tcp radiusdesk db3c6fa81d8b bitnami/mariadb:10.5 "/opt/bitnami/script…" 2 hours ago Up 2 hours 3306/t
- Open a browser and call up the IP address of the host on which the Docker containers are running.