Is there a way to run docker image with few resources from host?

Hi, Good evening.

I have a small doubt that “is there any way to run docker image by utilizing few resources from host machine”?

To make it clear…
My application in the docker image needs OpenCL runtime and HSA runtime.

But I have only OpenCL Runtime in my docker image and missed to have HSA runtime in my image. But the application will run only if the image has both OpenCL runtime and HSA runtime.

But my host machine has HSA runtime.

So is there any way/possibility to run docker image by taking OpenCL runtime from docker image and HSA runtime from host machine?

Please clarify.

Note: runtime means .so library files to be used by the application.

no non-docker runtime services are available inside the container, this is the whole value of docker. isolation from the host.

you will have to rebuild your image… you could do it by using docker exec --it to get a commandline, run the install commands for HSA, then docker commit the container to create an updated image.

Thanks for the valuable information

I found one more way using -v command for bind mounting.

…using a Dockerfile.

(If the base image changes and you need to re-apply your updates…re-run docker build. Need to run the image on a different machine? Copy the Dockerfile over and run docker build. Realize you got a setup step wrong? Fix the Dockerfile and re-run docker build. Your coworker comes across this local Docker image a year later and needs to apply a security update? You’ve documented what you did in the Dockerfile and they can re-run docker build.)

Thanks sdetweil and dmaze.

Now I have a new question.
Are there any simple steps to build docker image from docker file using jenkins.
Means docker in Jenkins or jenkins in docker like that.
My requirement is…
I have a docker file with set of instructions, jenkins server, jenkins slave and docker installed in the slave…
Can I automate docker using jenkins + docker?
Please update me the simple way.

there are various jenkins plugins for docker… a google search will find them

but to build is a simple commandline… docker build