Redis is an open-source, networked, in-memory, key-value data store with optional durability. It is written in ANSI C. The development of Redis is sponsored by Redis Labs today; before that, it was sponsored by Pivotal and VMware. According to the monthly ranking by DB-Engines.com, Redis is the most popular key-value store. The name Redis means REmote DIctionary Server.
wikipedia.org/wiki/Redis
"Protected mode" is turned on by default. For further information, see the following links about Redis security:
If the first positional argument is redis-server, this image drops privileges by running redis-server as the noroot user, and the /data volume is mapped based on the PUID and PGID environment variables.
$ appjail oci run -Pd \
-o overwrite=force \
-o virtualnet=":<random> default" \
-o nat \
ghcr.io/appjail-makejails/redis some-redis \
redis-server --protected-mode no$ mkdir -p /var/appjail-volumes/redis/data
$ appjail oci run -Pd \
-o overwrite=force \
-o virtualnet=":<random> default" \
-o nat \
-o fstab="/var/appjail-volumes/redis/data /data" \
ghcr.io/appjail-makejails/redis some-redis \
redis-server --save 60 1 --loglevel warningThere are several different persistence strategies to choose from. This one will save a snapshot of the DB every 60 seconds if at least 1 write operation was performed (it will also lead to more logs, so the loglevel option may be desirable). If persistence is enabled, data is stored in the VOLUME ["/data"], which can be used with -o fstab="/appjail/host/dir /data" (see appjail.readthedocs.io volumes).
For more about Redis persistence, see the official Redis documentation.
$ appjail oci run \
-o ephemeral \
-o overwrite=force \
-o virtualnet=":<random> default" \
-o nat \
ghcr.io/appjail-makejails/redis redis-client \
redis-cli -h some-redis &&
appjail stop redis-clientYou can create your own Containerfile that adds a redis.conf from the context into /data/, like so.
FROM ghcr.io/appjail-makejails/redis
COPY redis.conf /usr/local/etc/redis.conf
CMD [ "redis-server", "/usr/local/etc/redis.conf" ]Alternatively, you can specify something along the same lines with appjail oci run options.
$ appjail oci run -Pd \
-o overwrite=force \
-o virtualnet=":<random> default" \
-o nat \
-o fstab="/myredis.conf usr/local/etc/redis.conf nullfs ro" \
ghcr.io/appjail-makejails/redis myredis \
redis-server --protected-mode no /usr/local/etc/redis.confWhere /myredis.conf is a local file containing your redis.conf file. Using this method means that there is no need for you to have a Containerfile for your redis container.
redis_from(default:ghcr.io/appjail-makejails/redis): Location of OCI image. See also OCI Configuration.redis_tag(default:latest): OCI image tag. See also OCI Configuration.
PGID(default:1000): Equivalent toPUIDbut for the Process Group ID.PUID(default:1000): Process User ID for the container's main process, allowing you to match the owner of files written to mounted host volumes to your host system's user. Writable volumes are changed based on this environment variable.
| Name | Owner | Group | Perm | Type | Mountpoint |
|---|---|---|---|---|---|
| appjail-263aca83a3-data | ${PUID} |
${PGID} |
- | - | /data |
build:
variants:
- tag: 15.1
containerfile: Containerfile
args:
FREEBSD_RELEASE: "15.1"
NO_PKGCLEAN: "1"
cache_dirs: ["pkgcache0:/var/cache/pkg"]
- tag: 15.1-62
containerfile: Containerfile
args:
FREEBSD_RELEASE: "15.1"
REDISVER: "62"
NO_PKGCLEAN: "1"
cache_dirs: ["pkgcache0:/var/cache/pkg"]
- tag: 15.1-72
containerfile: Containerfile
args:
FREEBSD_RELEASE: "15.1"
REDISVER: "72"
NO_PKGCLEAN: "1"
cache_dirs: ["pkgcache0:/var/cache/pkg"]
- tag: 15.1-74
containerfile: Containerfile
args:
FREEBSD_RELEASE: "15.1"
REDISVER: "74"
NO_PKGCLEAN: "1"
cache_dirs: ["pkgcache0:/var/cache/pkg"]
- tag: 15.1-80
containerfile: Containerfile
args:
FREEBSD_RELEASE: "15.1"
REDISVER: "80"
NO_PKGCLEAN: "1"
cache_dirs: ["pkgcache0:/var/cache/pkg"]
- tag: 15.1-82
containerfile: Containerfile
args:
FREEBSD_RELEASE: "15.1"
REDISVER: "82"
NO_PKGCLEAN: "1"
cache_dirs: ["pkgcache0:/var/cache/pkg"]
- tag: 15.1-84
containerfile: Containerfile
args:
FREEBSD_RELEASE: "15.1"
REDISVER: "84"
NO_PKGCLEAN: "1"
cache_dirs: ["pkgcache0:/var/cache/pkg"]
- tag: 15.1-86
containerfile: Containerfile
args:
FREEBSD_RELEASE: "15.1"
REDISVER: "86"
NO_PKGCLEAN: "1"
cache_dirs: ["pkgcache0:/var/cache/pkg"]
- tag: 15.1-88
containerfile: Containerfile
aliases: ["latest"]
default: true
args:
FREEBSD_RELEASE: "15.1"
REDISVER: "88"
NO_PKGCLEAN: "1"
cache_dirs: ["pkgcache0:/var/cache/pkg"]
- tag: 15.1-devel
containerfile: Containerfile
args:
FREEBSD_RELEASE: "15.1"
REDISVER: "-devel"
NO_PKGCLEAN: "1"
cache_dirs: ["pkgcache0:/var/cache/pkg"]- The ideas present in the Docker image of Redis are taken into account for users who are familiar with it.
