Skip to content

Commit 781e423

Browse files
authored
Merge pull request #2579 from Peter-Sh/master
Update documentation for Redis
2 parents a3e1e22 + 9566b6b commit 781e423

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

redis/content.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ For the ease of accessing Redis from other containers via Docker networking, the
1414
- [Protected mode](https://redis.io/docs/latest/operate/oss_and_stack/management/security/#protected-mode)
1515
- [A few things about Redis security by antirez](http://antirez.com/news/96)
1616

17+
## Process User and Privileges
18+
19+
By default, the Redis Docker image drops privileges by switching to the redis user and removing unnecessary capabilities. This step is skipped if Docker is run with the `--user` option or if you set the `SKIP_DROP_PRIVS=1` (since 8.0.2) environment variable.
20+
21+
Note: Using `SKIP_DROP_PRIVS` is not recommended, as it reduces the container's security.
22+
1723
# How to use this image
1824

1925
## Start a redis instance
@@ -32,6 +38,20 @@ There are several different persistence strategies to choose from. This one will
3238

3339
For more about Redis persistence, see [the official Redis documentation](https://redis.io/docs/latest/operate/oss_and_stack/management/persistence/).
3440

41+
### File and Directory Permissions
42+
43+
Redis will attempt to correct the ownership and permissions of the data and configuration (since 8.0.2) directories and files if they are not set correctly. This adjustment is only performed in basic, default scenarios to avoid interfering with custom or user-specific configurations.
44+
45+
You can skip this step by setting the `SKIP_FIX_PERMS=1`(since 8.0.2) environment variable.
46+
47+
### Manually Setting File and Directory Permissions
48+
49+
If you prefer to handle file permissions yourself, you can use a `docker run` command to set the correct ownership on mounted volumes. For example:
50+
51+
```console
52+
$ docker run --rm -v /your/host/path:/data %%IMAGE%% chown -R redis:redis /data
53+
```
54+
3555
## Connecting via `redis-cli`
3656

3757
```console

0 commit comments

Comments
 (0)