You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I use custom docker image from a private registry as a build environment in one of my pipeline's steps. This image contains some files which I would like to access during the step execution. However, when I enter the step and execute the `ls` command, all I see is the content of my repository.
To be precise, my backend service and integration tests reside in separate repositories. My pipeline is triggered by pull requests in the backend repository. In order to run integration tests in the pipeline, I `COPY`ed my tests to the image that I use as a build environment. Now, when I enter the step with integration testing, I cannot execute `./gradlew clean test`, getting 'no such file or directory' exception.
Can I access the files put to my custom image? Do they necessarily have to be present in the repo that runs the pipeline?
I thinks this is an old question and maybe it has been solved. But I've came across this question because I faced the same problem.
Finally, my solution was to change to the directory where I placed everything in the container's image. I mean, in the Dockerfile I had specified a `WORKDIR` (let's say `/my-dir`) and there I have everything that the container stores.
So then, in the step that executes from this image, you should do a:
So that you are in the image folder that contains everything stored there.
I hope this can help you (if you haven't solve it yet by your own) or anyone that is facing the same problem.