#FROM alpine
FROM ubuntu:latest as build

ARG DEBIAN_FRONTEND=noninteractive

# install rclone
#RUN apk -U add ca-certificates fuse rclone dcron tzdata \
#    && rm -rf /var/cache/apk/* 
RUN apt update
RUN apt install -y ca-certificates fuse cron tzdata rclone \
    && apt autoremove -y \
    && rm -rf /var/lib/apt/lists/* \
    && apt clean


# install entrypoint
ADD docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh

#ADD config/rclone.conf /root/.config/rclone/rclone.conf

#VOLUME ["/config"]

# defaults env vars
ENV CRON_SCHEDULE="0 0 * * *"
ENV COMMAND="rclone version"

ENTRYPOINT ["/docker-entrypoint.sh"]

RUN touch /var/log/cron.log

CMD ["cron", "-f"]


