-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (24 loc) · 908 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM node:10-alpine
ENV RCLONE_VERSION=current
ENV RCLONE_ARCH=amd64
ENV RCLONE_CONFIG_REMOTE_TYPE=
ENV RCLONE_CONFIG_REMOTE_TOKEN=
RUN apk update && apk upgrade && \
echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories && \
echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories
RUN apk add --no-cache libressl mongodb-tools@edge ca-certificates fuse wget
# RCLONE TOOL
RUN cd /tmp \
&& wget -q http://downloads.rclone.org/rclone-${RCLONE_VERSION}-linux-${RCLONE_ARCH}.zip \
&& unzip /tmp/rclone-${RCLONE_VERSION}-linux-${RCLONE_ARCH}.zip \
&& mv /tmp/rclone-*-linux-${RCLONE_ARCH}/rclone /usr/bin \
&& rm -r /tmp/rclone*
RUN mkdir /app
RUN mkdir -p /backup/mongodb
WORKDIR /app
COPY . .
RUN npm ci
ENV PATH="/app/bin:${PATH}"
COPY cronbox_schedule /var/spool/cron/crontabs/root
RUN chmod +x /app/bin -R
CMD crond -l 2 -f