A secure Valkey image
| scripts | ||
| .editorconfig | ||
| Dockerfile | ||
| justfile | ||
| LICENSE | ||
| README.md | ||
Valkey
A hardened Valkey image, ready for production use.
Configuration
Configuration is handled through environment variables.
| Environment Variable | Default Value | Description |
|---|---|---|
UID |
999 |
The user the container will run under. By default it's the same as in Valkey's base image. |
GID |
999 |
The group the container will run under. By default it's the same as in Valkey's base image. |
VALKEY_ALLOW_EMPTY_PASSWORD |
no |
Whether empty passwords are allowed. If kept as "no" and VALKEY_PASSWORD is empty, the container will exit immediately. Is set to yes, will turn off protected-mode. |
VALKEY_APPEND_FSYNC |
everysec |
Corresponds to the appendfsync config option. Determines when fsync is called on the OS. Valid options are "everysec" (default), "always" and "no". |
VALKEY_CONFIG_PATH |
/tmp/valkey.conf |
The path to the config file. The directory must be writable to the user. This config file is re-created on startup. |
VALKEY_ENABLE_SNAPSHOTS |
yes |
Whether RDB snapshots will be created. Will also create AOF snapshots if VALKEY_ENABLE_APPEND_ONLY_FILE_SNAPSHOTS is set to yes. If this config option is set to no, snapshotting will be disabled completely. |
VALKEY_ENABLE_APPEND_ONLY_FILE_SNAPSHOTS |
yes |
Whether AOF snapshots will be created as well. |
VALKEY_LOG_LEVEL |
warning |
The log level to apply. Valid options, in order of verbosity, are debug, verbose, notice, warning (default) and nothing. |
VALKEY_PASSWORD |
empty string | The password for AUTH calls. This may be empty if VALKEY_ALLOW_EMPTY_PASSWORD is set to yes. |
VALKEY_SNAPSHOT_TIMINGS |
300 1 60 10 |
The timing of when to save a snapshots of the database. The format of the timings is <seconds> <writes> [<seconds> <writes>...]. You may specify any amount of these. Leaving this empty will effectively disable snapshots. The default is to snapshot every 5 minutes if at least 1 write has occurred and every minute if at least 10 writes have occurred. |
Building
The following build args are available:
| Environment Variable | Default Value | Description |
|---|---|---|
UID |
999 |
The user the container will run under. By default it's the same as in Valkey's base image. |
GID |
999 |
The group the container will run under. By default it's the same as in Valkey's base image. |