I found the '--network host' option in Docker, so now we don't have to launch the...
[citadel-docker.git] / run-citadel.sh
1 #!/bin/bash
2
3 # This is a simple startup script to run Citadel in a Docker container.
4 # If you know your way around Docker, you don't have to use it; feel free to do whatever you want.
5 # The container expects a persistent volume called "citadel-data" in which it will keep everything.
6 # The remainder of the container is ephermal and can be deleted at any time.
7
8 exec docker run \
9         --name citadel \
10         -it \
11         --rm \
12         --network host \
13         --mount type=bind,source=/root/citadel/citadel,target=/citadel-data \
14         $*
15
16 #       Explanation of the above options:
17 #
18 #       --name citadel                  Create a container named "citadel"
19 #       -it                             Run in the foreground
20 #       --rm                            Delete the container when it exits
21 #       --network host                  Bind directly to the host's network ports instead of creating a separate interface
22 #       --mount                         This identifies where on the host our persistent Citadel database is found