# The container expects a persistent volume called "citadel-data" in which it will keep everything.
# The remainder of the container is ephermal and can be deleted at any time.
-docker run \
+exec docker run \
--name citadel \
-it \
--rm \
- -p 25:25 \
- -p 80:80 \
- -p 110:110 \
- -p 119:119 \
- -p 143:143 \
- -p 443:443 \
- -p 465:465 \
- -p 504:504 \
- -p 563:563 \
- -p 587:587 \
- -p 993:993 \
- -p 995:995 \
- -p 5222:5222 \
+ --network host \
--mount type=bind,source=/root/citadel/citadel,target=/citadel-data \
$*
+
+# Explanation of the above options:
+#
+# --name citadel Create a container named "citadel"
+# -it Run in the foreground
+# --rm Delete the container when it exits
+# --network host Bind directly to the host's network ports instead of creating a separate interface
+# --mount This identifies where on the host our persistent Citadel database is found