]> 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 f021bf5e52e8f7099a06dd41ab79cf10f9a1f8a7..41192966c46c0873758afe33425787e06aa55efa 100755 (executable)
@@ -1,7 +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:/citadel-data \
-       -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