Closed markych96 closed 7 years ago
Force UID=0
(root) when starting the container:
docker exec -u 0 -it [container_id] sh
@markych96, has @rbellamy helped you out here? Can I close this issue?
-u 0
not helped
but i think you can close issue, i think that error is caused by alpine os as a docker host system
then i start alpine-s6-overlay on rancher host error was gone
@markych96, okay, thanks.
@smebberson I would like to request that this is reopen. In my case I am running a program that is running ping as the apache user. The service is started with a uid of 0 however the apache user is not able to run ping.
an easy fix is chmod u+s /bin/ping
however I feel like this should be something that makes it's way upstream.
To reproduce you can do build this dockerfile https://github.com/michaeljs1990/phpipam/blob/dockerfile/Dockerfile and then exec into it make a lol.php file in the working dir and use this script.
<?php
exec('/bin/ping -c 5 -w 5 192.168.1.5 2>&1', $output);
var_dump($output);
and go go lol.php.
P.S you will have to remove the chmod u+s /bin/ping
which i just pushed to that dockerfile.
ops sorry, got confused with what repo i was in. name doesn't help :P
I've ran into the same issue running an Alpine Docker image on an Alpine Docker host. Forcing UID 0 does not work either.
Hello! Is that normal behaviour? what after creating container by command
docker run -d smebberson/docker-alpine
and then getting shell bydocker exec -it [container_id] sh
and sendping 172.17.0.1
i've got a error messageping: permission denied (are you root?)
how can i solve this problem?
P.S. docker version 1.12.1
thank you
Add user: root in docker-compose file
i've ran into the same issues. and maybe you could try
docker exec -it [container_id] --privileged sh
all of things will be fine
Run the following command may resolve your issue. # apk add --no-cache iputils && addgroup $USER ping
Hello! Is that normal behaviour? what after creating container by command
docker run -d smebberson/docker-alpine
and then getting shell bydocker exec -it [container_id] sh
and sendping 172.17.0.1
i've got a error messagehow can i solve this problem?
P.S. docker version 1.12.1
thank you