[FIX]Fix overlayfs problem with tail and cron via docker VOLUMES
This commit is contained in:
parent
9b3d10a27e
commit
8f8de4cbf0
@ -7,9 +7,11 @@ ENV DEST /var/backups/
|
|||||||
RUN apt-get update && apt-get install --no-install-recommends -y \
|
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||||
cron gettext-base rsync python-minimal libpython-stdlib
|
cron gettext-base rsync python-minimal libpython-stdlib
|
||||||
|
|
||||||
|
# Avoid overlayfs bug with tail
|
||||||
|
VOLUME /var/log
|
||||||
|
|
||||||
COPY crontab /etc/crontab
|
COPY crontab /etc/crontab
|
||||||
RUN chmod 644 /etc/crontab
|
RUN chmod 644 /etc/crontab
|
||||||
RUN touch /var/log/cron.log
|
|
||||||
|
|
||||||
WORKDIR /opt/backup
|
WORKDIR /opt/backup
|
||||||
COPY rsync.template .
|
COPY rsync.template .
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
envsubst < /opt/backup/rsync.template > /opt/backup/rsync.sh
|
envsubst < /opt/backup/rsync.template > /opt/backup/rsync.sh
|
||||||
envsubst < /opt/backup/plan.tpl.py > /opt/backup/plan.py
|
envsubst < /opt/backup/plan.tpl.py > /opt/backup/plan.py
|
||||||
cron && tail -f /var/log/cron.log
|
touch /var/log/cron.log && cron && tail -f /var/log/cron.log
|
||||||
|
@ -10,15 +10,17 @@ USER root
|
|||||||
RUN mkdir backups
|
RUN mkdir backups
|
||||||
RUN apt-get install -y --no-install-recommends cron gettext-base
|
RUN apt-get install -y --no-install-recommends cron gettext-base
|
||||||
|
|
||||||
|
# Avoid overlayfs bug with tail
|
||||||
|
VOLUME /var/log
|
||||||
|
|
||||||
COPY crontab /etc/crontab
|
COPY crontab /etc/crontab
|
||||||
RUN chmod 644 /etc/crontab
|
RUN chmod 644 /etc/crontab
|
||||||
RUN touch /var/log/cron.log
|
|
||||||
|
|
||||||
COPY backup.template .
|
COPY backup.template .
|
||||||
COPY plan.py .
|
COPY plan.py .
|
||||||
COPY launch.sh .
|
COPY launch.sh .
|
||||||
|
|
||||||
RUN chown -R odoo:odoo . && chown odoo:odoo /var/log/cron.log
|
RUN chown -R odoo:odoo .
|
||||||
VOLUME /home/odoo/backups
|
VOLUME /home/odoo/backups
|
||||||
|
|
||||||
CMD bash launch.sh
|
CMD bash launch.sh
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
envsubst < /home/odoo/backup.template > /home/odoo/backup.sh
|
envsubst < /home/odoo/backup.template > /home/odoo/backup.sh
|
||||||
chown odoo:odoo /home/odoo/backup.sh
|
chown odoo:odoo /home/odoo/backup.sh
|
||||||
cron && tail -f /var/log/cron.log
|
touch /var/log/cron.log && cron && tail -f /var/log/cron.log
|
||||||
|
Loading…
Reference in New Issue
Block a user