Conversation
|
The example of |
|
Reproduce:
The log will be like as follow: |
|
Thank you for the PR! Do you know what exactly causes the bug? I tried to reproduce with Maybe it is the It seems like the way for the bug to trigger is if |
You can create another normal user, one with a UID not equal to |
|
I noticed that Perhaps |
|
I found the reason for "running as root" because I defined services:
code_server:
extends:
file: ./docker-compose.example.yml
service: code_server
user: root
pid: host
ipc: host
cap_add:
- ALL
security_opt:
- apparmor=unconfinedThen I disabled some features by commenting out some fields. services:
code_server:
extends:
file: ./docker-compose.example.yml
service: code_server
# user: root
# pid: host
# ipc: host
# cap_add:
# - ALL
security_opt:
- apparmor=unconfinedYes, the official code works fine with a custom UID. |
|
Ohh interesting! If it runs as root, is that a sign that something else is wrong? Either way, it seems reasonable to use # Rename coder user to the name in DOCKER_USER if DOCKER_USER does not already exist.
if ! id -u "$DOCKER_USER" 2>/dev/null ; then |
Because the command will print the UID when it begins to check, I have replaced it with the code as below. if [ -z "$(id -u "$DOCKER_USER" 2>/dev/null)" ]; thenTest case:
ALL PASSED! Cheers! |
|
Sorry for the delay, thank you for fixing this and for the thorough testing! This will be published soon, I think in the next few days after the release candidate has had time to sit. |
Cannot start stopped docker container, user 'coder' does not exist