From fab101a40ecb55ff1b0671e51dd5d6d69483c9ec Mon Sep 17 00:00:00 2001 From: Alwyn Kik Date: Tue, 4 Dec 2018 15:21:44 +0100 Subject: [PATCH 1/3] Use container's hostname instead of localhost as backuppc hostname --- files/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/entrypoint.sh b/files/entrypoint.sh index 7e664dd..cdbb14a 100755 --- a/files/entrypoint.sh +++ b/files/entrypoint.sh @@ -59,7 +59,7 @@ if [ -f /firstrun ]; then --cgi-dir /var/www/cgi-bin/BackupPC \ --data-dir /data/backuppc \ --log-dir /data/backuppc/log \ - --hostname localhost \ + --hostname $( Date: Tue, 4 Dec 2018 15:45:18 +0100 Subject: [PATCH 2/3] Added docs on how to set the hostname --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index a127444..0b778d2 100644 --- a/README.md +++ b/README.md @@ -236,6 +236,18 @@ The configure.pl script will detect a v3.x version under /etc/backuppc, and will ## Miscellaneous +### Hostname + +The backuppc host name will default to the container's hostname. You can modify this by setting `--hostname` in your `docker run` command like so: + +```bash +docker run \ + --name backuppc \ + --hostname backuppc.example.org \ + --publish 80:8080 \ + adferrand/backuppc +``` + ### Timezone By default the timezone of this docker is set to UTC. To modify it, you can specify a tzdata-compatible timezone in the environment variable `TZ`. From 8601c9fe6699467210a29ec2cb0535aa56b1c0ac Mon Sep 17 00:00:00 2001 From: Alwyn Kik Date: Tue, 4 Dec 2018 15:46:53 +0100 Subject: [PATCH 3/3] Added link to new section in readme index --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0b778d2..335af57 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ * [Upgrading](#upgrading) * [Dockerising an existing BackupPC v3.x](#dockerising-an-existing-backuppc-v3x) * [Miscellaneous](#miscellaneous) + * [Hostname](#hostname) * [Timezone](#timezone) * [Shell access](#shell-access) * [Legacy version](#legacy-version)