Unicon / shibboleth-idp-dockerized

A Shibboleth Identity Provider (IdP) base-image
Apache License 2.0
108 stars 54 forks source link

centos7 no longer includes 'which' and it needs to be manually added via yum #8

Closed MrFishFinger closed 8 years ago

MrFishFinger commented 8 years ago

I get this error when running any of these tags: latest, 3.2.0, 3.2.1...

Looks like java/which might be missing from the image?

tag 3.1.2 seems to be unaffected

root@ubuntutest1:~/blah# docker build --tag="blah/shibboleth-idp" .
Sending build context to Docker daemon 71.68 kB
Step 1 : FROM unicon/shibboleth-idp:3.2.1
 ---> 23deda497131
Step 2 : MAINTAINER <your_contact_email>
 ---> Running in f1bfd1522cbf
 ---> 4cf1ac6715d8
Removing intermediate container f1bfd1522cbf
Step 3 : ADD shibboleth-idp/ /opt/shibboleth-idp/
 ---> eb7940e54d8b
Removing intermediate container dc4cef7078d0
Successfully built eb7940e54d8b

root@ubuntutest1:~/blah# docker run -it --name="shib-local-test"  blah/shibboleth-idp: bash
[root@2de5e899918e /]# java
bash: java: command not found
exit

root@ubuntutest1:~/blah# docker run --name="shib-local-test"  blah/shibboleth-idp
Use of this image/container constitutes acceptence of the Oracle Binary Code License Agreement for Java SE.
/etc/init.d/jetty: line 326: which: command not found
Cannot find a Java JDK. Please set either set JAVA or put java (>=1.5) in your PATH.
jtgasper3 commented 8 years ago

@MrFishFinger I'm looking into this now.

I think I made the mistake of not updating the base centos:centos7 image before rebuilding the based IdP image and then running my test suite (https://github.com/UniconLabs/dockerized-idp-testbed) against the new image.

My guess is that the latest centos no longer includes which be default.

jtgasper3 commented 8 years ago

I've confirmed that it is the missing which command causing issues. The CentOS guys appear to have removed it from their base image (probably to shrink the image size as it is one of the largest base images out there).

I'll also be updating the "build" instructions to pull the latest centos7 image before build a new version. Hopefully that will remind myself to do this before future updates.

Thanks for the report.

jtgasper3 commented 8 years ago

Commit: d496450a7c903c6da0f15c6046a2bd32cebca3eb

MrFishFinger commented 8 years ago

many thanks for the quick fix! that seems to have resolved that issue. unfortunately I have run into another :( i have created a new ticket here: https://github.com/Unicon/shibboleth-idp-dockerized/issues/10