generated from ztimson/template
This commit is contained in:
15
Dockerfile
Normal file
15
Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
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"]
|
||||
Reference in New Issue
Block a user