simpleSAMLphp installed on a vagrant virtual machine and hosted in Docker.
##Introduction
This is plug and play. Run the installation and SimpleSAMLphp will be waiting
This setup uses VirtualBox and VagrantUp to instanciate the virtual machines
- Install VirtualBox
- Install VagrantUp
The following commands will download the Ubuntu Images and provision the virtual machine. All software will be installed and once completed SimpleSAMLphp will be ready to use.
git clone https://github.com/jnyryan/docker-simplesamlphp.git
cd docker-simplesamlphp
vagrant up
vagrant ssh
From the host machine the following ports are forwarded to the Vagrant VM.
- 58080
- 58443
To get to either the HTTP or HTTPS setup hit the following endpoints:
To access simpleSAMLphp from the browser:
username: admin
password: password
Docker is a lightweight container that I use to host simpleSAMLphp running under apache as an experiment. All the work down below is already done in the Vagrant setup, the details are included if you would like to further develop it.
- Install Docker
sudo apt-get install -y docker.io
sudo ln -sf /usr/bin/docker.io /usr/local/bin/docker
sudo sed -i '$acomplete -F _docker docker' /etc/bash_completion.d/docker.io
Rather than build it yourself, the full container is available on DockerHub
sudo docker pull jnyryan/simplesamlphp
sudo docker run -d -p 58080:80 -p 58443:443 jnyryan/simplesamlphp
To access simpleSAMLphp from the host server:
http://localhost:50081/simplesaml/
username: admin
password: password
To use your own configs stored on the host in /var/simplesamlphp
sudo docker run -d -p 58080:80 -p 58443:443 \
-v /var/simplesamlphp/config/:/var/simplesamlphp/config/ -v /var/simplesamlphp/metadata/:/var/simplesamlphp/metadata/ -v /var/simplesamlphp/cert/:/var/simplesamlphp/cert/ \
jnyryan/simplesamlphp
```˛
## Build the Package and Publish it to Dockerhub
Build the package locally and push it to dockerhub
``` bash
sudo docker login
sudo docker pull jnyryan/simplesamlphp
sudo docker build -t jnyryan/simplesamlphp /vagrant/.
sudo docker push jnyryan/simplesamlphp
This will clean up any old images built
sudo bash
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker rmi $(docker images -a -q)
exit
simpleSAMLphp Installation and Configuration
How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu