Skip to content

Devpod doesn't update UID, GID of the remoteuser when using docker compose #1953

@MhhhxX

Description

@MhhhxX

What happened?
I set up a devcontainer with a docker-compose.yml file. The mounted workspace folder inside the devcontainer is owned by the user www-data. When creating and connecting to the devcontainer with devpod my local files change ownership to the UID of the www-data user although I configured the remoteuser in devcontainer.json.

What did you expect to happen instead?
Devpod changes the UID of the remoteuser (www-data) inside the devcontainer to the UID of the local user when starting the devcontainer.

How can we reproduce the bug? (as minimally and precisely as possible)
.devcontainer/docker-compose.yml:

name: dev

services:
  webserver:
    image: alpine
    command: tail -f /dev/null
    working_dir: /root

.devcontainer/devcontainer.json:

{
    "name": "Test",
    "dockerComposeFile": ["./docker-compose.yml"],
    "service": "webserver",
    "containerUser": "root",
    "remoteUser": "root",
    "workspaceFolder": "/root"
}

index.html:
empty test file

Run:

devpod up 

User root now owns the local index.html file instead of my local non-root user.

Local Environment:

  • DevPod Version: v0.6.15
  • Operating System: linux
  • ARCH of the OS: AMD64

DevPod Provider:
- Cloud Provider: google | aws | azure | digitalOcean
- Kubernetes Provider: [use kubectl version]

  • Local/remote provider: docker
    - Custom provider: provide imported provider.yaml config file

Anything else we need to know?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions