-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (17 loc) · 713 Bytes
/
Dockerfile
File metadata and controls
24 lines (17 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
ARG MONGO_VERSION=8.0
FROM mongo:${MONGO_VERSION} AS base
ARG TARGETARCH
ARG GOCRON_VERSION=0.0.5
# Install dependencies
RUN apt-get update && apt-get install -y curl unzip && rm -rf /var/lib/apt/lists/* \
&& curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
&& unzip awscliv2.zip && ./aws/install && rm -rf awscliv2.zip aws
COPY src/install.sh /install.sh
RUN chmod +x /install.sh && TARGETARCH=${TARGETARCH} GOCRON_VERSION=${GOCRON_VERSION} /install.sh
COPY src/env.sh /env.sh
COPY src/backup.sh /backup.sh
COPY src/restore.sh /restore.sh
COPY src/run.sh /run.sh
RUN chmod +x /backup.sh /restore.sh /run.sh
ENV PATH="/usr/local/bin:$PATH"
ENTRYPOINT ["/run.sh"]