2018-08-21 07:08:51 +00:00
|
|
|
FROM golang:1.10 AS build
|
2018-08-22 17:19:21 +00:00
|
|
|
|
|
|
|
RUN go get github.com/glenux/trello2mail-go/...
|
2018-08-21 07:08:51 +00:00
|
|
|
WORKDIR /go/src/github.com/glenux/trello2mail-go
|
2018-08-22 17:19:21 +00:00
|
|
|
RUN CGO_ENABLED=0 go build ./...
|
2018-08-21 07:08:51 +00:00
|
|
|
|
|
|
|
FROM alpine:3.7
|
2018-08-22 17:19:21 +00:00
|
|
|
RUN apk update \
|
|
|
|
&& apk add --no-cache dcron ca-certificates \
|
|
|
|
&& rm -rf /var/cache/apk/*
|
|
|
|
|
|
|
|
RUN mkdir /app
|
|
|
|
COPY --from=build /go/src/github.com/glenux/trello2mail-go/trello2mail /app/
|
2018-08-27 13:48:20 +00:00
|
|
|
COPY docker/trello2mail.cron /app/
|
2018-08-22 17:19:21 +00:00
|
|
|
|
2018-08-28 07:54:06 +00:00
|
|
|
CMD ["sh", "-c", "/usr/bin/crontab /app/trello2mail.cron && /usr/sbin/cron -f"]
|
2018-08-22 17:19:21 +00:00
|
|
|
|