Add templates in docker image
This commit is contained in:
parent
439016256d
commit
5669e52d2c
1 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
##
|
||||||
|
## stage 1 : Build
|
||||||
|
##
|
||||||
FROM golang:1.11 AS build
|
FROM golang:1.11 AS build
|
||||||
|
|
||||||
# git clone https://github.com/glenux/trello2mail /app
|
# git clone https://github.com/glenux/trello2mail /app
|
||||||
|
@ -6,14 +9,19 @@ COPY . /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN CGO_ENABLED=0 go build -v ./...
|
RUN CGO_ENABLED=0 go build -v ./...
|
||||||
|
|
||||||
FROM alpine:3.7
|
|
||||||
|
##
|
||||||
|
## Stage 2 : Runtime
|
||||||
|
##
|
||||||
|
FROM alpine:3.7 AS runtime
|
||||||
RUN apk update \
|
RUN apk update \
|
||||||
&& apk add --no-cache dcron tzdata ca-certificates bash \
|
&& apk add --no-cache dcron tzdata ca-certificates bash \
|
||||||
&& rm -rf /var/cache/apk/*
|
&& rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
RUN mkdir /app
|
RUN mkdir /app
|
||||||
COPY --from=build /app/trello2mail /app/
|
COPY --from=build /app/trello2mail /app/
|
||||||
COPY --from=build /app/docker/trello2mail.cron /app/
|
COPY docker/trello2mail.cron /app/
|
||||||
|
COPY templates /app/
|
||||||
|
|
||||||
CMD ["/bin/sh", "-c", "/usr/bin/crontab /app/trello2mail.cron && /usr/sbin/crond -f"]
|
CMD ["/bin/sh", "-c", "/usr/bin/crontab /app/trello2mail.cron && /usr/sbin/crond -f"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue