# Ports
EXPOSE 25 80 110 119 143 443 465 504 563 587 993 995 2020 5222
+# We don't need the workdir anymore
+RUN rm -fr /tmp/ctdl_build
+
# Let's go!
ENTRYPOINT ["/usr/local/bin/ctdlvisor"]
#!/bin/bash
+
+# This wipes out all of your containers, images, and volumes. Don't run it.
+
docker ps -a | awk ' { print $1 } ' | xargs docker rm
docker image list | awk ' { print $3 } ' | xargs docker image rm
docker volume list | awk ' { print $2 } ' | xargs docker volume rm
# 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.
+# If you want to keep your Citadel data in a specific directory on the host,
+# set CTDL_VOL to "bind" and CTDL_DIR to the full pathname of that directory.
+# This is what you want if you are switching from Easy Install to Docker.
+#
+#CTDL_VOL=bind
+#CTDL_DIR=/usr/local/citadel
+
+# If you want to keep your Citadel data in a Docker volume,
+# set CTDL_VOL to "volume" and CTDL_DIR to the name of the volume.
+#
+CTDL_VOL=volume
+CTDL_DIR=citadel-data
+
+docker version >/dev/null 2>&1 || {
+ echo Docker engine is not installed on this host.
+ exit 1
+}
+
exec docker run \
--name citadel \
-it \
--rm \
--network host \
- --mount type=bind,source=/root/citadel/citadel,target=/citadel-data \
+ --mount type=${CTDL_VOL},source=${CTDL_DIR},target=/citadel-data \
$*
# Explanation of the above options: