lima-vm / lima-vm/lima

Mounted volumes change permissions to root:nogroup

Open
#693 5 comments 2 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
21.9k
Forks
957
Avg merge
2d 6h
Merged PRs (30d)
53

Description

### Description

I'm on Big Sur

```
docker -v
Docker version 20.10.12, build e91ed5707e
```

Hello, I'm just trying a simple Dockerfile like this:

```
FROM node:16

RUN mkdir /web && chown node:node /web

WORKDIR /web

COPY --chown=node:node package.json package-lock.json* ./
USER node
RUN npm install --legacy-peer-deps && npm cache clean --force

COPY --chown=node:node . .

EXPOSE 3000
```

Which has a couple volumes mounted in docker-compose.

```
volumes:
- ./react:/web
- /web/node_modules
```

If there are no volume mounts, the container is running with files under user:group `node:node` like expected, but once I mount volumes, these files are having their users and groups changed to `root:nogroup`.

Docker Desktop mounts the volumes keeping node:node permissions in the container.

Is there anyway with Lima to achieve this same behaviour? Thanks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.