Public | Automated Build

Last pushed: 3 days ago
Short Description
A SimpleSAMLphp (ssp) base-image
Full Description


This Docker image contains a deployed SimpleSAMLphp IdP/SP based on PHP 5.5 running on Appache HTTP Server 2.4 on the latest CentOS 7 base. This image is a base image and should be used to set the content and configuration with local changes. It is suitable for use as a standalone IdP application or as a base to deploy another PHP application that will be protected by the service provider module.

|-- etc/
|   |-- httpd/
|   |   |-- conf/       - The Apache HTTP Server configuration
|-- var/
|   |-- log/
|   |   |-- httpd/      - The log files for Apache HTTP Server 
|   |-- simplesamlphp/  - The base SimpleSAMLphp directory
|   |   |-- conf/       - The SimpleSAMLphp configuration directory
|   |-- www/
|   |   |-- html/       - The base Apache HTTP Server document root directory

SimpleSAMLphp is verified using cryptographic hashes obtained from the vendor and stored in the Dockerfile directly.

A working example of how this image can be used can be found at


It is recommended that only the highest version tag is used as each previous tag/version is generally associated to fixes of the SimpleSAMLphp application.

Creating a SimpleSAMLphp Configuration

Image adopters should follow the SimpleSAMLphp documentation ( to configure the IdP/SP and/or other features. Include other directories that one would often customized, such as the images, css, and application files themselves.

Using the Image

You should use this image as a base image for one's own IdP/SP deployment. The directory structure could look like:

|-- .dockerignore
|-- Dockerfile
|-- etc-httpd/
|   |-- conf.d/
|   |   |-- httpd.conf
|-- var-simplesamlphp/
|   |-- config/
|   |   |-- config.php
|-- var-www/
|   |-- html/
|   |   |-- index.php

Next, assuming you create a Dockerfile similar to this example:

FROM unicon/shibboleth-idp

MAINTAINER <your_contact_email>

COPY etc-httpd/ /etc/httdp/
COPY var-simplesamlphp/ /var/simplesamlphp/
COPY var-www/ /var/www/

The dependant image can be built by running:

docker pull centos:centos7
docker build --tag="<org_id>/simplesamlphp-idp:<version>" .


docker pull centos:centos7
docker build --tag="<org_id>/ourapplication:<version>" .

This will download the base image from the Docker Hub repository. Next, your files are overlaid replacing the base image's counter-parts.

Now, execute the new/customized image:

$ docker run -d --name="ssp-local-test" <org_id>/simplesamlphp-idp


$ docker run -d --name="ourapplication-local-test" <org_id>/ourapplication

This is the base command-line used to start the container. The container will likely fail to initialize if this limited command-line is used. You'll likely need to specify additional parameters to start-up the container.

Run-time Parameters

Start the IdP will take several parameters. The following parameters can be specified when running a new container:

Port Mappings

The image exposes two ports. 80 is the for standard browser-based HTTP communication. 443 is the standard browser-based HTTPS/TLS communication port. These ports will need to be mapped to the Docker host so that communication can occur.

  • -P: Used to indicate that the Docker Service should map all exposed container ports to ephemeral host ports. Use docker ps to see the mappings.
  • -p <host>:<container>: Explicitly maps the host ports to the container's exposed ports. This parameters can be used multiple times to map multiple sets of ports. -p 443:443 would make the service accessible on https://<docker_host_ip>/simplesaml/.

Environmental variables

No explicit envinonmental variables are used by this container. Any that SimpleSAMLphp might use can be used per the application documentation.

Volume Mount

The container does not explicitally need any volumes mapped for operation, but the option does exist using the following format:

  • -v hostDir:containerDir

It maybe desirable to map things like /var/log/httpd/ or /var/simplesamlphp/cert/ to host-side storage.


There are a few things that implementors should be aware of.

Browser-based TLS Certificate and Key

Adapters should generate their own private key and get the CSR signed by a trusted certificate authority. The resulting files should be included in the image (directly or mounted to the container at start-up). The standard Apache HTTPD TLS config can be changed by adding/modifying the files in /etc/httpd/conf.d/.


This image does not use the standard Docker logging mechanism, but the native OS-based logging.

Building from source:

$ docker build --tag="<org_id>/simplesamlphp"



Copyright 2016 Unicon, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

Docker Pull Command
Source Repository

Comments (0)