Permalink
Browse files

Use volume for /var/log fixing issue #2

1 parent 9441ff5 commit 7a157dcd05ea8e745ec604734f6e7aa2e9e7b7cc @fkoester fkoester committed Jul 26, 2016
Showing with 14 additions and 4 deletions.
  1. +7 −3 Dockerfile
  2. +6 −0 README.md
  3. +1 −1 entrypoint.sh
View
@@ -5,6 +5,13 @@ MAINTAINER Fabian Köster <fabian.koester@bringnow.com>
# This holds the webroot required for ACME authentication
VOLUME /var/acme-webroot
+# Put cron logfiles into a volume. This also works around bug
+# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810669
+# caused by base image using old version of coreutils
+# which causes "tail: unrecognized file system type 0x794c7630 for '/var/log/cron.log'"
+# when using docker with overlay storage driver.
+VOLUME /var/log/
+
# Install runtime dependency
RUN apt-get update && apt-get install -y bsdmainutils --no-install-recommends
@@ -20,9 +27,6 @@ COPY cli.ini /root/.config/letsencrypt/
# Give execution rights to scripts
RUN chmod 0744 /etc/cron.d/letsencrypt /usr/local/bin/*
-# Create the log file to be able to run tail
-RUN touch /var/log/cron.log
-
ENTRYPOINT [ "entrypoint.sh" ]
# Run the command on container startup
View
@@ -144,3 +144,9 @@ Removing an domain from the host can be achieved by executing `letsencrypt-manag
### Sync certificates, keys and configuration to a Git repository
If you want to backup the private keys and certificates (what you should do!) we recommend [docker-git-sync](https://github.com/bringnow/docker-git-sync). It will periodically listen for changes in the */etc/letsencrypt* folder and commit & push any changes to a Git repository of your choice. **Make sure to keep this Git repository in a safe place!**
+
+## Troubleshooting
+
+### tail: unrecognized file system type 0x794c7630 for '/var/log/cron.log
+
+Please update your letsencrypt-manager docker image and recreate your container(s), see https://github.com/bringnow/docker-letsencrypt-manager/issues/2.
View
@@ -254,7 +254,7 @@ elif [ "${CMD}" = "auto-renew" ]; then
elif [ "${CMD}" = "help" ]; then
print_help "${@}"
elif [ "${CMD}" = "cron-auto-renewal" ]; then
- cron && tail -f /var/log/cron.log
+ touch /var/log/cron.log && cron && tail -f /var/log/cron.log
elif [ "${CMD}" = "print-pin" ]; then
print_pin "${@}"
else

0 comments on commit 7a157dc

Please sign in to comment.