Origin: /docker-entrypoint.sh: line 37: /etc/hosts: Permission denied

Created on 21 Sep 2016  路  2Comments  路  Source: openshift/origin

[provide a description of the issue]

Version

[provide output of the openshift version or oc version command]
oc v1.2.0
kubernetes v1.2.0-36-g4a3f9c5

Steps To Reproduce

dockerimage from ubuntu and install nginx

[root@master1 ec2-user]# docker exec -ti k8s_test.2ea41a60_test-1-e6gld_backend_32eb220a-8039-11e6-abfa-023688d9a871_9b479fca bash
groups: cannot find name for group ID 1000040000
I have no name!@test-1-e6gld:/$ whoami
whoami: cannot find name for user ID 1000040000
I have no name!@test-1-e6gld:/$ echo "127.0.0.1 test " >> /etc/hosts
bash: /etc/hosts: Permission denied

Current Result

Permission denied in CMD or ENTRYPOIND sections in docker file, but if run this image on docker I have all permitions

Expected Result
Additional Information

[try to run $ oadm diagnostics command if possible]
[if you are reporting issue related to builds, provide build logs with BUILD_LOGLEVEL=5]
[consider attaching output of the $ oc get all -o json -n <namespace> command to the issue]
[visit https://docs.openshift.org/latest/welcome/index.html]

run command: oc new-app --docker-image=private_docker_hub/test --name test

kinquestion prioritP2

Most helpful comment

containers run on openshift are assigned a random uid rather than running as the default uid declared by the image. this can cause problems for some images.

To run your image as a specific user instead of a random user, see:
https://docs.openshift.org/latest/admin_guide/manage_scc.html#enable-images-to-run-with-user-in-the-dockerfile

To fix your image so it can tolerate being run with a random uid, see "Support arbitrary user ids" here:
https://docs.openshift.org/latest/creating_images/guidelines.html#openshift-origin-specific-guidelines

All 2 comments

containers run on openshift are assigned a random uid rather than running as the default uid declared by the image. this can cause problems for some images.

To run your image as a specific user instead of a random user, see:
https://docs.openshift.org/latest/admin_guide/manage_scc.html#enable-images-to-run-with-user-in-the-dockerfile

To fix your image so it can tolerate being run with a random uid, see "Support arbitrary user ids" here:
https://docs.openshift.org/latest/creating_images/guidelines.html#openshift-origin-specific-guidelines

Hello, I'm trying to host Seq on OpenShift
PODs are dying with: /run.sh: line 37: /bin/seq-server/Seq: Permission denied

I think it has something to do with @bparees response.

Unfortunately, I don't know how to run CHMOD as part of SEQ startup and what directory it should change permission to. Did anyone was successfull with hosting Seq on OpenShift?

Was this page helpful?
0 / 5 - 0 ratings