-
Notifications
You must be signed in to change notification settings - Fork 48
/
Dockerfile
45 lines (38 loc) · 1.3 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
FROM alpine:latest
MAINTAINER MickMake <[email protected]>
USER root
ARG GO_REPO_TOKEN
ENV GO_REPO_TOKEN ${GO_REPO_TOKEN}
# SUNGRO_GIT_TOKEN SUNGRO_HOST SUNGRO_ID SUNGRO_PASSWORD SUNGRO_SECRET SUNGRO_USER SUNGRO_DIFF_CMD
ARG GO_REPO_TOKEN
ENV GO_REPO_TOKEN ${GO_REPO_TOKEN}
ARG SUNGRO_HOST
ENV SUNGRO_HOST ${SUNGRO_HOST}
ARG SUNGRO_USER
ENV SUNGRO_USER ${SUNGRO_USER}
ARG SUNGRO_PASSWORD
ENV SUNGRO_PASSWORD ${SUNGRO_PASSWORD}
ARG SUNGRO_ID
ENV SUNGRO_ID ${SUNGRO_ID}
ARG SUNGRO_SECRET
ENV SUNGRO_SECRET ${SUNGRO_SECRET}
ARG SUNGRO_GIT_REPO
ENV SUNGRO_GIT_REPO ${SUNGRO_GIT_REPO}
ARG SUNGRO_GIT_DIR
ENV SUNGRO_GIT_DIR ${SUNGRO_GIT_DIR}
ARG SUNGRO_GIT_TOKEN
ENV SUNGRO_GIT_TOKEN ${SUNGRO_GIT_TOKEN}
ARG SUNGRO_DIFF_CMD
ENV SUNGRO_DIFF_CMD ${SUNGRO_DIFF_CMD}
ARG TZ
ENV TZ ${TZ}
COPY dist/GoSungrow_linux_amd64/GoSungrow /usr/local/bin/GoSungrow
COPY .ssh/ /root/.ssh/
RUN chmod a+x /usr/local/bin/GoSungrow && \
chmod 500 /root/.ssh && \
chmod 400 /root/.ssh/gosungro_rsa /root/.ssh/gosungro_rsa.pub && \
apk add --no-cache colordiff tzdata
# echo '00 07 * * * /usr/local/bin/GoSungrow sync default' > /etc/crontabs/root
#ENTRYPOINT ["/usr/local/bin/GoSungrow"]
#CMD ["crond", "-f", "-l", "2", "-L", "/var/log/cronlogs"]
CMD ["/usr/local/bin/GoSungrow", "cron", "run", "00", "07", ".", ".", ".", "sync", "default"]