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
Image build failed in Openshift #379
Comments
Probably, the issue is that in OpenShift per-default only non-root containers are allowed. See #105 . |
Seems like there is some documention around running you container as root in OpenShift (which would be required to build that Dockerfile with kaniko) |
Going to assume those docs resolved the issue, plz reopen if not @fsc12 ! |
I have made an openshift-compatible version of the executor image here which seems to work for me (OKD 3.11): https://github.com/ContainerSolutions/dockerfiles/tree/master/kaniko-openshift No changes necessary to UID, this image should handle the default OS UID magic. I have also based it on alpine to make it work with Jenkins and to easily add CA certificates (or anything else you might need.) |
Actual behavior
Trying to build images in Openshift results in an error:
....
INFO[0004] Extracting layer 0
DEBU[0005] creating dir /
error building image: error building stage: chmod /: operation not permitted
Expected behavior
The build successfully executes.
To Reproduce
Steps to reproduce the behavior:
Create a secret in Openshift
oc create secret generic kaniko-secret --from-file=kaniko-secret.json
Create a ConfigMap which contains the Dockerfile
oc create configmap config-docker --from-file=Dockerfile
Create a ConfigMap which contains x.509-certificates
oc create configmap ca-certificates --from-file=cert.crt
4.) Create the Pod
oc create -f pod.yaml
pod.yaml
5.) Dockerfile
Dockerfile
The error occurred for all base-Images I've testet (RHEL7, Debian9, Centos7).
The text was updated successfully, but these errors were encountered: