-
Notifications
You must be signed in to change notification settings - Fork 525
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
Running in Docker fails with "must be owned by the user identifier (uid=1000) or root" #3042
Comments
Note that if I wrote my own Dockerfile and did:
the server would run, but this still does not allow bind-mount-type configs as you'd expect from Elastic, Kibana or Logstash. |
I'm unable to reproduce this behavior - What are the OS of the host system and versions of docker cilent and server? bind mounted Also what does
|
Hmm. I'm using Docker 18.09.7, build 2d0083d on Ubuntu 18.04, with Docker Compose 1.25.0. The uid of my currently logged in user is 1001. The mounts show:
I have another user on the server with uid 1000, but the problem is the same when creating the container with that one. I also don't see how a user |
I'm guessing your host system is macOS since your default user gets uid 501? I can confirm that it works under macOS, where I get:
|
It's created here. The Dockerfile you linked earlier is actually only used by the testsuite, we should really make that more clear.
Yeah, my test host was macOS. Trying ubuntu 18.04 now. |
I see, thanks! I have a hunch. The project was initially cloned as root, later chowned to the user with the other ID. It might be an ACL issue? I can check tomorrow. |
Confirmed the behavior you're seeing on ubuntu. Two options to get this working immediately:
services:
apm-server:
command: --strict.perms=false
image: docker.elastic.co/apm/apm-server:7.5.0
volumes:
- ./apm-server.yml:/usr/share/apm-server/apm-server.yml I'll leave this open while we investigate other options. |
Thanks for the documentation link; I didn't spot this earlier as I didn't have to do this while setting up the rest of the ELK stack (with user-mounted configs). Indeed the documentation actually provides another workaround for building the image with the config embedded, similar to what I proposed above:
|
Sure, that make sense. We should consider including a pointer to Closing this out now as a solution exists and we haven't tracked down another option. Thanks @slhck |
I think the |
I'm using APM Server 7.5.0 within a Docker Compose environment.
The YAML file looks basically like this; it bind-mounts the configuration into the container, so that it does not have to be baked into the image when building. This is common practice, and it works for Elasticsearch, Kibana, and Logstash without issues.
When launching the container, it immediately exits with:
The issue seems to be that the file is mounted by the user calling Docker Compose, which is not always the user having ID 1000.
Since it is not possible to change the user with whose permissions the file is mounted, the only solution would be to:
apm-server
commandapm-server
is createdI see that the Elasticsearch Dockerfile adds its own user, as is recommended, whereas the
apm-server
Dockerfile does not. Could this be the cause?The text was updated successfully, but these errors were encountered: