Home > Net >  How to connect paths in Docker file
How to connect paths in Docker file

Time:05-19

I am running a Jenkins job, inside a docker container, this job requires doxygen but im getting an error saying -

[exec] /bin/sh: /opt/fc4-usr-local/bin/doxygen: No such file or directory

I have doxygen installed in my Docker image, but the path is -

usr/bin/doxygen

Inside my docker image, I want to connect this old path - /opt/fc4-usr-local/bin/doxygen with new path usr/bin/doxygen

So whenever my job looks for doxygen it goes to new path usr/bin/doxygen.

Note 1. The reason I cant just edit my job to look for doxygen in the new path is that its files are locked and im not allowed to changes them,

Note 2. So my idea is that, when my Jenkins job look for doxygen in my docker container it goes straight for new path not the old one.

Could anyone please suggest any ideas for this.

CodePudding user response:

Add these lines near the bottom of your Dockerfile:

RUN mkdir -p /opt/fc4-usr-local/bin
RUN ln -s /usr/bin/doxygen /opt/fc4-usr-local/bin/doxygen

The first line creates the directory. The second line creates a symlink from one path to the other

  • Related