Uses gradle to build CAS 6.x
To build & run CAS in Docker type:
docker-compose up --force-recreate
Open up a page at https://localhost:8443/cas/login and login as:
Type ctrl-c to exit, then type this to cleanup:
docker-compose down --rmi all
If you want to grab a copy of the cas.war file that is running in the container use the 'docker cp' command, for example:
wishbringer:~ $ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
79e44dd14c7e dockercasdev_cas "/usr/bin/java -ja..." 21 seconds ago Up 20 seconds 0.0.0.0:8443->8443/tcp dockercasdev_cas_1
6f5bc662213b nginx "nginx -g 'daemon ..." 5 days ago Exited (0) 5 days ago webserver
de061f8c8aef alpine "env" 5 days ago Exited (0) 5 days ago amazing_feynman
4e3975361ef2 alpine "ifconfig" 5 days ago Exited (0) 5 days ago keen_jang
wishbringer:~ $ docker cp 79e44dd14c7e:/root/cas.war .
wishbringer:~ $ ls -l cas.war
-rw-r--r-- 1 crpeck staff 91251638 Aug 15 14:40 cas.war
The end result is an image of about 173MB that has a full implementation of CAS.
REPOSITORY TAG IMAGE ID CREATED SIZE
casoverlaydocker_cas latest 954457811c53 18 seconds ago 173MB
In order to get the proxy authentication working, you need to make sure that the container has imported your SSL certificate (self signed or not).
Your certificate needs to be setup for a local host on your machine.
Create a docker-compose.override.yml
file:
version: '2'
services:
cas:
extra_hosts:
- "casclient:172.22.0.1"
Change casclient
and 172.22.0.1
based on your host settings.
On my side casclient
is the hostname of CAS client application and 172.22.0.1
is the IP of the host running Docker.
Copy the SSL certificate from your application into etc/cas/config/certificate.pem
.
The format of the certificate must be in PEM
.
docker-compose up
or
docker-compose up --force-recreate --build