2018-11-22 16:24:19 +00:00
|
|
|
FROM golang:1.11 AS build
|
2018-08-22 17:19:21 +00:00
|
|
|
|
2018-11-23 15:33:42 +00:00
|
|
|
# git clone https://github.com/glenux/trello2mail /app
|
|
|
|
COPY . /app
|
2018-11-22 16:07:32 +00:00
|
|
|
|
2018-11-22 16:31:39 +00:00
|
|
|
WORKDIR /app
|
|
|
|
RUN CGO_ENABLED=0 go build -v ./...
|
2018-08-21 07:08:51 +00:00
|
|
|
|
|
|
|
FROM alpine:3.7
|
2018-08-22 17:19:21 +00:00
|
|
|
RUN apk update \
|
2018-12-27 11:32:30 +00:00
|
|
|
&& apk add --no-cache dcron tzdata ca-certificates bash \
|
2018-08-22 17:19:21 +00:00
|
|
|
&& rm -rf /var/cache/apk/*
|
|
|
|
|
|
|
|
RUN mkdir /app
|
2018-11-22 16:31:39 +00:00
|
|
|
COPY --from=build /app/trello2mail /app/
|
|
|
|
COPY --from=build /app/docker/trello2mail.cron /app/
|
2018-08-22 17:19:21 +00:00
|
|
|
|
2018-08-28 09:03:20 +00:00
|
|
|
CMD ["/bin/sh", "-c", "/usr/bin/crontab /app/trello2mail.cron && /usr/sbin/crond -f"]
|
2018-08-22 17:19:21 +00:00
|
|
|
|