forked from stefanprodan/mgob
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
49 lines (40 loc) · 1.67 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM alpine:3.6
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
ENV GOOGLE_CLOUD_SDK_VERSION 181.0.0
ENV PATH /root/google-cloud-sdk/bin:$PATH
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="mgob" \
org.label-schema.description="MongoDB backup automation tool" \
org.label-schema.url="https://github.com/stefanprodan/mgob" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/stefanprodan/mgob" \
org.label-schema.vendor="stefanprodan.com" \
org.label-schema.version=$VERSION \
org.label-schema.schema-version="1.0"
RUN apk add --no-cache mongodb-tools ca-certificates
ADD https://dl.minio.io/client/mc/release/linux-amd64/mc /usr/bin
RUN chmod u+x /usr/bin/mc
WORKDIR /root/
#install gcloud
# https://github.com/GoogleCloudPlatform/cloud-sdk-docker/blob/69b7b0031d877600a9146c1111e43bc66b536de7/alpine/Dockerfile
RUN apk --no-cache add \
curl \
python \
py-crcmod \
bash \
libc6-compat \
openssh-client \
git \
&& curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${GOOGLE_CLOUD_SDK_VERSION}-linux-x86_64.tar.gz && \
tar xzf google-cloud-sdk-${GOOGLE_CLOUD_SDK_VERSION}-linux-x86_64.tar.gz && \
rm google-cloud-sdk-${GOOGLE_CLOUD_SDK_VERSION}-linux-x86_64.tar.gz && \
ln -s /lib /lib64 && \
gcloud config set core/disable_usage_reporting true && \
gcloud config set component_manager/disable_update_check true && \
gcloud config set metrics/environment github_docker_image && \
gcloud --version
COPY mgob .
VOLUME ["/config", "/storage", "/tmp", "/data"]
ENTRYPOINT [ "./mgob" ]