-
Notifications
You must be signed in to change notification settings - Fork 99
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
Containers don't work in Ubuntu due to permission errors #65
Comments
This is what I created for the CI system. https://github.com/PX4/Firmware/blob/master/Tools/docker_run.sh#L47 The important part is |
You can also use it locally. ./Tools/docker_run.sh 'make posix_sitl_default' |
Resolved or do we need to do something else here? |
Hi Daniel, |
I am still struggling with just |
would be great if we can get the integration documentation up to a state where ppl can test the integration tests locally without going through a lot of research how to to do that. Right now I think it would be even better to remove the documentation for integration tests entirely, since it does not represent the current state at all. |
About the permissions problem. Why having a user in the containers? I am usually running everything as root inside the docker containers. Anyway, using a user called "user" with the |
@JonasVautherin the common use case is a developer or CI system that has the source outside of the container and then mounts it as a volume. If it builds inside the container as root it's a pain to deal with the root owned build artifacts afterwards. |
I see. Anyway, they can still try to mount it on |
@Stifael can you share the full output for how you're running this and what you see? |
my current issue is completely different to what I had before. This is the small script that I used:
When I go into
|
This seems more like git returning an error status 128 than a docker issue. Did you try to run the command multiple times? |
It might be a path issue for git. Try keeping the same absolute path within the container. You can use this crappy script in Firmware to launch docker with the appropriate container, user setup, volume in the right place, etc.
|
I just ran across this and figured I'd comment. I don't have these issues. I'm using Additionally, not using the root account would be better. I didn't need The error above is from |
As per PX4/PX4-Devguide#232 ...
I followed the instructions in devguide here, setting up docker in a clean Ubuntu 16.04 running on a VM (in Windows). Including post instructions to ensure I didn't have to execute docker as sudo.
I added /src dir and cloned Firmware in it. I can see that the parent above src belongs to root, and that src and below belong to my logged in user (via
ls -la
)Then I tried to run the image in our docs:
This "worked". I can log in and see /src/firmware, and the contents I have cloned. When I try to run
make posix_sitl_default gazebo
I get permission errors because docker can't create the build directory. The reason being that docker sets itself up as root user by default, which does not appear to have access.If I go back to ubuntu and make access on the git tree "open" (e.g.
chmod -R 7777 .
) then I can build from docker and everything works. However this is a pretty bad recommendation to give users.I have tried to send in another user via the -u flag (e.g. my current VM host user id "1000"). This does not work (user is not found). I tried the flag with the user's name too, but got told there is a missing password file. I think the problem is that the VM does not know about any users outside of itself other than root.
Any suggestions on "right way to fix". I'm hoping for instructions that don't require a user to do anything to their machine other than run a docker command.
FYI, this is the setup script:
Then restarted and verified using
docker run hello-world
The text was updated successfully, but these errors were encountered: