-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paths under /var/run ignored #506
Comments
@JonathanRRogers I was facing the same problem with building postgres image from Debian and noticed that since /var/run is a pointer to /run, if I do "RUN mkdir -p /run/test", then I find the folder under /run/test on the image. But I still believe that the problem with /var/run needs to be solved as it does raise a need for a workaround on some installation like in the case of Postgresql. |
The above workaround works on Debian, but not CentOS, since /run and /var/run are distinct directories on CentOS. |
This also seems to prevent the successful building of things like this: https://docs.docker.com/engine/examples/running_ssh_service/ |
I'm not sure this is related, but I'm finding that, when building using Jenkins on a Kubernetes cluster, /var/run is being mounted into the image being produced. I start with a very minimal custom base-image and install packages, which includes installing a package called But when I run this on my Jenkins build server, I get the error:
Looking into it further, I see that k8s is automounting /var/run/secrets as part of the pod definition, and kaniko is respecting that. I was able to get my builds to work by adding |
Is there any known workaround except modifying application so that it doesn't use /var/run ? |
Investigating this issue I found an additional problem. As detailed here on many systems I did not see the above issue using
|
|
What system are you using? I am able to run "docker run --rm -it centos:centos6 bash" on both Ubuntu 18.04.3 LTS (kernel 5.1.0-050100-generic) and Fedora 30 (kernel 5.2.16-200.fc30.x86_64). Under "A note about vsyscall" on https://hub.docker.com/_/centos, it explains how to work around the problem. In any case, system call mapping is unrelated to the problem described in this issue. |
Whatever problems you have with centos:centos6 aren't relevant to this issue. I have changed the example Dockerfile to use "debian" instead of "centos:centos6". One could likely use any base image with a "mkdir" command and the problem would be the same. |
I apparently made an error earlier; I now am able to repro the issue with |
Thanks. |
I think we need to support a feature flag to override whitelists. |
Is it recommended to use |
Fix #506 add option additional-whitelist
Actual behavior
Directories and files created under /var/run do not exist in created image.
Expected behavior
All directories and files created in Dockerfile should exist in created image.
To Reproduce
Create directory /var/run/test in Dockerfile. Observe that /var/run/test doesn't exist in resulting image.
Additional Information
FROM debian
RUN mkdir -p /var/run/test
The text was updated successfully, but these errors were encountered: