@@ -6,6 +6,7 @@ This document shows how to run and test the module with Docker.
66- Local testing with other DBs
77- Testing AuthProc filters
88- Build image for conformance tests
9+ - Build against an unreleased SimpleSAMLphp version
910- Docker Compose
1011
1112## Run with the current git branch (live mount)
@@ -117,18 +118,59 @@ docker exec ssp-oidc-dev-image sqlite3 /var/simplesamlphp/data/mydb.sq3 '.dump'
117118
118119Conformance tests are easier to run locally. See [ Conformance] ( 5-oidc-conformance.md ) .
119120
121+ ## Build against an unreleased SimpleSAMLphp version
122+
123+ The OP image is built ` FROM ` a SimpleSAMLphp base image, selected with the
124+ ` SSP_IMAGE ` build argument (default: a published ` cirrusid/simplesamlphp `
125+ release tag). Published tags only exist for SimpleSAMLphp * releases* , so to run
126+ against an unreleased SimpleSAMLphp branch (or any specific ref) you first build
127+ a base image from that ref and then point ` SSP_IMAGE ` at it.
128+
129+ > During v7 development the module depends on the unreleased ` simplesamlphp-2.5 `
130+ > branch (it uses ` \SimpleSAML\Locale\Language::getAvailableLanguages() ` , added
131+ > there for the ` ui_locales ` support). Until a SimpleSAMLphp release contains it,
132+ > the OP image must be built from that branch, otherwise the discovery endpoint
133+ > fails.
134+
135+ The [ cirrusid/simplesamlphp image] ( https://github.com/cirrusidentity/docker-simplesamlphp )
136+ installs SimpleSAMLphp with Composer when given an ` SSP_COMPOSER_VERSION ` build
137+ argument, which accepts any Composer version — a branch (` dev-<branch> ` ) or a
138+ tag (` v2.5.2 ` ):
139+
140+ ``` bash
141+ # 1. Build a SimpleSAMLphp base image from the desired ref (branch or tag).
142+ git clone https://github.com/cirrusidentity/docker-simplesamlphp.git
143+ docker build docker-simplesamlphp/docker \
144+ --build-arg SSP_COMPOSER_VERSION=dev-simplesamlphp-2.5 \
145+ -t ssp-base:dev-simplesamlphp-2.5
146+
147+ # 2. Build and run the OP on top of it. For the docker/Dockerfile-based builds
148+ # (Docker Compose below and the conformance image above) set SSP_IMAGE:
149+ SSP_IMAGE=ssp-base:dev-simplesamlphp-2.5 OIDC_VERSION=@dev \
150+ docker compose -f docker/docker-compose.yml --project-directory . up --build
151+ ```
152+
153+ For the live-mount ` docker run ` example above, use the built base image name
154+ (` ssp-base:dev-simplesamlphp-2.5 ` ) directly in place of
155+ ` cirrusid/simplesamlphp:... ` . This is exactly what the GitHub Actions conformance
156+ job does: it builds the base image from ` matrix.ssp-composer-version ` and passes
157+ it as ` SSP_IMAGE ` .
158+
120159## Docker Compose
121160
122161Docker Compose runs multiple containers to ease testing. It builds an
123162image containing the OIDC module. You can remove ` --build ` to reuse an
124- existing container.
163+ existing container. The SimpleSAMLphp base image defaults to a published
164+ ` cirrusid/simplesamlphp ` release tag; override it with ` SSP_IMAGE ` to run
165+ against a different base (see "Build against an unreleased SimpleSAMLphp
166+ version" above).
125167
126168``` bash
127169# Use current branch/git checkout. Composer installs local checkout
128- OIDC_VERSION=@dev docker- compose -f docker/docker-compose.yml --project-directory . up --build
170+ OIDC_VERSION=@dev docker compose -f docker/docker-compose.yml --project-directory . up --build
129171
130172# Use a specific module version
131- OIDC_VERSION=dev-master docker- compose -f docker/docker-compose.yml --project-directory . up --build
173+ OIDC_VERSION=dev-master docker compose -f docker/docker-compose.yml --project-directory . up --build
132174```
133175
134176Visit the OP and verify a few clients exist:
0 commit comments