FROM alpine:latest
MAINTAINER Richard Morgan

USER root

ENV DOCKER_VERSION=17.09.0-ce
ENV DOCKER_MACHINE_VERSION=v0.13.0

RUN apk add --update \
      gpgme \
      curl \
      py-pip && \
    pip install --upgrade pip && \
    # Cleanup
    rm -rf /var/cache/apk/* && rm -rf /tmp/* && rm -rf /var/log/*

COPY ./periodic /etc/periodic
COPY ./crontab /var/spool/cron/crontabs/root
RUN chmod +x -R /etc/periodic/

# Run the command on container startup
#CMD cron && tail -f /var/log/cron.log
#CMD tail -f /var/log/cron.log
ENTRYPOINT crond -d 8 -f
