Working examples for Docker Images

I have started working with Open OnDemand and I want to run a docker container.
The ondemand/Dockerfile.example at master · OSC/ondemand · GitHub is working but asks for authenication method. ondemand/Dockerfile.demo at master · OSC/ondemand · GitHub seems to not have been updated and when trying to build the image it outputs errors.

I have also tried to use existing yaml files and add the to the Dockerfile.example but it seems that I don’t do it successfully.

Would it be able to update the Dockerfile.demo and dev files in order to have a complete example on how to run Open OnDemand on a docker container?

Do you suggest another way of running onDemand apart from natively?

Thank you very much.

Hello and welcome!

The docker image is used for an example to take OOd for a “test ride”, but if I’m understanding this post, were you trying to use this to setup a prod instance of OOD? If so, that is not what that image is intended for. We include the .example extension to semantically pass on this is just for an example, not a prod instance.

We do recommend using the rpm or deb files we distribute to build OOD natively on a simple VM to run the web-node for OOD.

Some centers have containerized OOD and they may be able to chime in here, but the OOD team does not currently have a prod container that we distribute for use nor is it something on the road map for us currently.

I’d recommend starting in the docs and working through them as you work on this install:

Thank you very much for your answer.

Right now I have managed to set it up on a Rocky Linux 9 vm (I had some issues with SELinux I believe it should be a bit more prominent this part). I have a this auth configuration for now

auth:

‘AuthType Basic’
‘AuthName “Open OnDemand”’
‘AuthUserFile “/etc/httpd/.htpasswd”’
‘Require valid-user'

and I got a bit stuck on how to use other authentication methods. Since I am working with it for a 1-2 days I will check the documentation some more and if I cannot find a solution I may repost.

Thanks again for your help!

Are you just trying to take this for a test spin? Seeing you set the Basic auth is why I ask. If it’s for dev environment and you need a quick hack there for that part just use this:

auth:
  - 'AuthType Basic'
  - 'AuthName "Open OnDemand"'
  - 'AuthBasicProvider file'
  - 'AuthUserFile /etc/ood/htpasswd'
  - 'Require valid-user'

and issue sudo htpasswd -c /etc/ood/htpasswd $(whoami) and that should give you a dev setup to play with the frontend pretty quickly.

Right now it is not for a dev environment but thank you for your info. When i try to use the $(whoami) user, I get the error below. Adding a new user with useradd and creating a password for him doesn’t create this problem

If this is a production instance, you should not be using basic auth.

Please use a proper authentication mechanism that won’t expose your credentials.

I mentioned in a post previously but will say again as well the docker images are not for production. If you are using those for a production setup, stop. You will end up in a very bad place going forward if you do this.

It seems like you are doing several things at once and I’m having a hard time following what it is you are trying to accomplish at this point, but please do not use those example containers for production environments.

No.

If you do a docker setup, you will need to put the time, research, and work into making that work for your center.

I’m trying to be very clear here as I think there’s a language barrier happening and there is some confusion that needs cleared up.

The first thing you need to figure out is what is your auth solution, and then use the auth integration page to set that up.

It is important to read through the docs and not jump around as you work on the install.

Hello again,

  • It is not a production environment. It is a sandbox environment to learn how to work with open OnDemand.
  • I am not using the Docker images as you suggested I am using a VM with Rocky Linux 9 to run OnDemand natively.
  • I am working alongside the documentation and I think it is better for now to work a bit more on the app (with the documentation) before dwelling into more questions since I don’t want to waste your time. If any more issues occur during the installation I may repost on Get Help.

Thank you very much for your time and effort on my problem.