Unable to start Consul Docker container - node-id permission denied
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 39
Description
```
badger_1 | ==> failed to setup node ID: open /consul/data/node-id: permission denied
```
```
version: '3'
services:
badger:
image: consul:1.8.5
volumes:
- ./consul:/consul
command: agent -server --data-dir=/consul/data -ui -node=server-1 -bootstrap-expect=1 -client=0.0.0.0
```
```
ls -la ./consul/data
drwxrwxrwx 4 root root 4096 Oct 31 13:15 .
drwxrwxrwx 4 root root 4096 Oct 31 13:07 ..
-rwxrwxrwx 1 korny korny 394 Oct 31 13:07 checkpoint-signature
-rwxrwxrwx 1 korny korny 0 Oct 31 13:15 node-id
drwxrwxrwx 3 korny korny 4096 Oct 31 13:07 raft
drwxrwxrwx 2 korny korny 4096 Oct 31 13:07 serf
```
what's going on here? Obviously no permission issue possible
Contributor guide
Research direction
Start by reproducing the failure with the shown Docker Compose service and its ./consul bind mount. Inspect the container user, /consul/data, and the host-side permissions while comparing the consul:1.8.5 image behavior. Done means the permission-denied cause is identified and a verified configuration or workaround is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100