mirror of https://github.com/immich-app/immich.git
Description
-----------
When I follow the [developer setup](https://docs.immich.app/developer/setup) I run into a permission error using rootless docker. A while ago I asked on Discord in [#contributing](https://discord.com/channels/979116623879368755/1071165397228855327/1442974448776122592) about these ulimits.
I suggest to remove the `ulimits` altogether. It seems that @ItalyPaleAle has left the setting just hoping that it could help somebody in the future. See the [PR description](https://github.com/immich-app/immich/pull/4556).
How Has This Been Tested?
-------------------------
Using rootless docker:
```
$ docker context ls
NAME DESCRIPTION DOCKER ENDPOINT ERROR
default unix:///var/run/docker.sock
rootless * unix:///run/user/1000/docker.sock
```
Running `make` will fail because of permission errors:
```
$ docker compose -f ./docker/docker-compose.dev.yml up --remove-orphans
...
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting rlimits for ready process: error setting rlimit type 7: operation not permitted
```
On my machine I have the following hard limit for "Maximum number of open file descriptors":
```
$ ulimit -nH
524288
```
I can confirm that the permission error is caused by the security restrictions of the operating system mentioned above:
Changing `docker/docker-compose.dev.yml` like ..
```
ulimits:
nofile:
soft: 524289
hard: 524289
```
.. will lead to a permission error whereas this ..
```
ulimits:
nofile:
soft: 524288
hard: 524288
```
.. starts fine.
Apparently the defaults for these limits are coming from [systemd](
|
||
|---|---|---|
| .. | ||
| .gitignore | ||
| README.md | ||
| docker-compose.dev.yml | ||
| docker-compose.prod.yml | ||
| docker-compose.yml | ||
| example.env | ||
| hwaccel.ml.yml | ||
| hwaccel.transcoding.yml | ||
| prometheus.yml | ||
README.md
[!CAUTION] Make sure to use the docker-compose.yml of the current release: https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
The compose file on main may not be compatible with the latest release.