generated from ztimson/template
16 lines
390 B
Docker
16 lines
390 B
Docker
FROM mongo:latest
|
|
|
|
ENV BACKUP_DIR=/data/backups
|
|
|
|
# Install cron
|
|
RUN apt-get update && apt-get install -y cron && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy backup script
|
|
COPY backup.sh /usr/local/bin/backup
|
|
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
|
RUN chmod +x /usr/local/bin/backup && \
|
|
chmod +x /usr/local/bin/entrypoint.sh
|
|
|
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
|
CMD ["mongod"]
|