]> code.citadel.org Git - citadel-docker.git/blobdiff - run-citadel.sh
I found the '--network host' option in Docker, so now we don't have to launch the...
[citadel-docker.git] / run-citadel.sh
index fa2e60fa7b886bdbb85be6aa60f728931fd764ea..41192966c46c0873758afe33425787e06aa55efa 100755 (executable)
@@ -1,9 +1,22 @@
 #!/bin/bash
 
-docker run \
+# This is a simple startup script to run Citadel in a Docker container.
+# If you know your way around Docker, you don't have to use it; feel free to do whatever you want.
+# 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.
+
+exec docker run \
        --name citadel \
-       -v citadel-data:/usr/local/citadel/data \
-       -v citadel-files:/usr/local/citadel/files \
-       -v citadel-keys:/usr/local/citadel/keys \
-       -d \
-       $1
+       -it \
+       --rm \
+       --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