apereo / cas-webapp-docker

Apereo CAS Server web application running inside a docker container.
https://hub.docker.com/r/apereo/cas/
Apache License 2.0
117 stars 88 forks source link

Clarification of the setup #26

Open mudrd8mz opened 6 years ago

mudrd8mz commented 6 years ago

I've spent a while setting up CAS 5.3.x and this is a summary of what I learned to make it running. Details below are relevant to particular issues discussed in #17 and #20.

  1. Clone https://github.com/apereo/cas-webapp-docker and change directory into the clone.

  2. Apply the following patch to make it use the correct branch:

    diff --git a/Dockerfile b/Dockerfile
    index 9cd4edc9d2..6f272ce1bc 100644
    --- a/Dockerfile
    +++ b/Dockerfile
    @@ -45,7 +45,7 @@ RUN cd / \

     # Download the CAS overlay project \
     RUN cd / \
    -    && git clone --depth 1 --single-branch https://github.com/apereo/cas-overlay-template.git cas-overlay \                                                                              
    +    && git clone --depth 1 --single-branch --branch 5.3 https://github.com/apereo/cas-overlay-template.git cas-overlay \                                                                 
         && mkdir -p /etc/cas \
         && mkdir -p cas-overlay/bin;
  1. The keystore coming with the repository is empty. Add a new self-signed entry into the keystore so that SSL will work in Tomcat:
    $ keytool -genkeypair -alias cas -keyalg RSA -keypass changeit -storepass changeit -keystore ./thekeystore \                                                                              
        -dname "CN=cas.example.org,OU=Example,OU=Org,C=AU" -ext SAN="dns:example.org,dns:localhost,ip:127.0.0.1"                                                                              
  1. Build it.
    ./build.sh 5.3.5
  1. Run it.
    ./run.sh 5.3.5
  1. Add cas.example.org to your hosts file.
    # echo '127.0.0.1 cas.example.org' >> /etc/hosts
  1. Go to https://cas.example.org:8443/cas/login
andrewnicols commented 5 years ago

Hi David,

I just did the following:

export CN="localhost" export DNAME="CN=$CN,O=Moodle,L=Perth,S=WA,C=AU" export CERT_SUBJ_ALT_NAMES="ip:127.0.0.1" /cas-overlay/build.sh gencert

I'm just testing it in my Dockerfile instead too.