I’m trying to self-host Zulip server using docker containers.
This configuration of docker-compose.yml shows, among others:
version: "2"
services:
memcached:
image: "memcached:alpine"
restart: unless-stopped
command:
- "sh"
- "-euc"
- |
echo 'mech_list: plain' > "$$SASL_CONF_PATH"
echo "zulip@$$HOSTNAME:$$MEMCACHED_PASSWORD" > "$$MEMCACHED_SASL_PWDB"
echo "zulip@localhost:$$MEMCACHED_PASSWORD" >> "$$MEMCACHED_SASL_PWDB"
exec memcached -S
environment:
SASL_CONF_PATH: "/home/memcache/memcached.conf"
MEMCACHED_SASL_PWDB: "/home/memcache/memcached-sasl-db"
MEMCACHED_PASSWORD: "REPLACE_WITH_SECURE_MEMCACHED_PASSWORD"
I don’t know how to properly translate services
→ memcached
→ command
into Nix virtualisation.oci-containers.containers.<container>
declaration.
I have already tried many options but with no luck.
What to do, when docker-compose.yml
contains extra commands that overwrite default command (CMD
from Dockerfile
I suppose)? Or, in other words, how to “translate” such commands to declarative syntax and be sure that they will act the same as in mainstream’s docker-compose.yml
?
Any help will be appreciated Cheers!